This makes the C++ ABI depend entirely on the target: MS ABI for -win32 triples, Itanium otherwise. It's no longer possible to do weird combinations. To be able to run a test with a specific ABI without constraining it to a specific triple, new substitutions are added to lit: %itanium_abi_triple and %ms_abi_triple can be used to get the current target triple adjusted to the desired ABI. For example, if the test suite is running with the i686-pc-win32 target, %itanium_abi_triple will expand to i686-pc-mingw32. Differential Revision: http://llvm-reviews.chandlerc.com/D2545 llvm-svn: 199250
29 lines
947 B
C++
29 lines
947 B
C++
// RUN: %clang_cc1 -emit-llvm -triple %itanium_abi_triple -std=c++11 -g %s -o - | FileCheck %s
|
|
// CHECK: metadata !"_ZTS1A"} ; [ DW_TAG_class_type ] [A]
|
|
// CHECK: metadata !"_ZN1A3fooEiS_3$_0", {{.*}} [protected]
|
|
// CHECK: ![[THISTYPE:[0-9]+]] = {{.*}} ; [ DW_TAG_pointer_type ] {{.*}} [artificial] [from _ZTS1A]
|
|
// CHECK: DW_TAG_ptr_to_member_type
|
|
// CHECK: {{.*}}metadata ![[MEMFUNTYPE:[0-9]+]], metadata !{{.*}}} ; [ DW_TAG_ptr_to_member_type ] {{.*}} [from ]
|
|
// CHECK: ![[MEMFUNTYPE]] = {{.*}}metadata ![[MEMFUNARGS:[0-9]+]], i32 0, null, null, null} ; [ DW_TAG_subroutine_type ] {{.*}} [from ]
|
|
// CHECK: ![[MEMFUNARGS]] = {{.*}}, metadata ![[THISTYPE]],
|
|
// CHECK: ""{{.*}}DW_TAG_arg_variable
|
|
// CHECK: ""{{.*}}DW_TAG_arg_variable
|
|
// CHECK: ""{{.*}}DW_TAG_arg_variable
|
|
union {
|
|
int a;
|
|
float b;
|
|
} u;
|
|
|
|
class A {
|
|
protected:
|
|
void foo(int, A, decltype(u));
|
|
};
|
|
|
|
void A::foo(int, A, decltype(u)) {
|
|
}
|
|
|
|
A a;
|
|
|
|
int A::*x = 0;
|
|
int (A::*y)(int) = 0;
|