35 lines · cpp
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 %s5// RUN: %clang_cc1 -emit-llvm %s -o - -triple x86_64-unknown-linux-gnu | FileCheck --check-prefix=CHECK-LINUX %s6//7// REQUIRES: x86-registered-target8 9namespace 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: @_Z6tmfunc2tm21// CHECK-SOLARIS: @_Z9tmccpfunc2tmPKcS1_22// CHECK-SOLARIS: @_Z7tm2func2tmS_23// CHECK-LINUX: @_Z6tmfuncSt2tm24// CHECK-LINUX: @_Z9tmccpfuncSt2tmPKcS1_25// CHECK-LINUX: @_Z7tm2funcSt2tmS_26 27void tmfunc (std::tm tm) {}28void tmccpfunc (std::tm tm, const char *ccp, const char *ccp2) {}29void tm2func (std::tm tm, std::tm tm2) {}30 31// CHECK-SOLARIS: @_Z7ldtfunc6ldiv_t32// CHECK-LINUX: @_Z7ldtfuncSt6ldiv_t33 34void ldtfunc (std::ldiv_t ldt) {}35