1 /// Check that std::tm and a few others are mangled as tm on Solaris only. 2 /// Issue #33114. 3 /// 4 // RUN: %clang_cc1 -emit-llvm %s -o - -triple amd64-pc-solaris2.11 | FileCheck --check-prefix=CHECK-SOLARIS %s 5 // RUN: %clang_cc1 -emit-llvm %s -o - -triple x86_64-unknown-linux-gnu | FileCheck --check-prefix=CHECK-LINUX %s 6 // 7 // REQUIRES: x86-registered-target 8 9 namespace std { 10 extern "C" { 11 struct tm { 12 int tm_sec; 13 }; 14 struct ldiv_t { 15 long quot; 16 }; 17 } 18 } 19 20 // CHECK-SOLARIS: @_Z6tmfunc2tm 21 // CHECK-SOLARIS: @_Z9tmccpfunc2tmPKcS1_ 22 // CHECK-SOLARIS: @_Z7tm2func2tmS_ 23 // CHECK-LINUX: @_Z6tmfuncSt2tm 24 // CHECK-LINUX: @_Z9tmccpfuncSt2tmPKcS1_ 25 // CHECK-LINUX: @_Z7tm2funcSt2tmS_ 26 27 void tmfunc (std::tm tm) {} 28 void tmccpfunc (std::tm tm, const char *ccp, const char *ccp2) {} 29 void tm2func (std::tm tm, std::tm tm2) {} 30 31 // CHECK-SOLARIS: @_Z7ldtfunc6ldiv_t 32 // CHECK-LINUX: @_Z7ldtfuncSt6ldiv_t 33 34 void ldtfunc (std::ldiv_t ldt) {} 35