1 // RUN: %clang_cc1 -std=c++11 -Wno-gnu-alignof-expression -emit-llvm %s -o - -triple=%itanium_abi_triple | FileCheck %s --check-prefix=CHECK-NEW
2 // RUN: %clang_cc1 -std=c++11 -Wno-gnu-alignof-expression -emit-llvm %s -o - -triple=%itanium_abi_triple -fclang-abi-compat=11 | FileCheck %s --check-prefix=CHECK-OLD
4 // Verify the difference in mangling for alignof and __alignof__ in a new ABI
7 template <class T
> void f1(decltype(alignof(T
))) {}
8 template void f1
<int>(__SIZE_TYPE__
);
9 // CHECK-OLD: void @_Z2f1IiEvDTatT_E
10 // CHECK-NEW: void @_Z2f1IiEvDTatT_E
12 template <class T
> void f2(decltype(__alignof__(T
))) {}
13 template void f2
<int>(__SIZE_TYPE__
);
14 // CHECK-OLD: void @_Z2f2IiEvDTatT_E
15 // CHECK-NEW: void @_Z2f2IiEvDTu11__alignof__T_E
17 template <class T
> void f3(decltype(alignof(T(0)))) {}
18 template void f3
<int>(__SIZE_TYPE__
);
19 // CHECK-OLD: void @_Z2f3IiEvDTazcvT_Li0EE
20 // CHECK-NEW: void @_Z2f3IiEvDTazcvT_Li0EE
22 template <class T
> void f4(decltype(__alignof__(T(0)))) {}
23 template void f4
<int>(__SIZE_TYPE__
);
24 // CHECK-OLD: void @_Z2f4IiEvDTazcvT_Li0EE
25 // CHECK-NEW: void @_Z2f4IiEvDTu11__alignof__XcvT_Li0EEEE