diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2018-02-23 15:32:32 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2018-02-23 15:32:32 +0000 |
commit | db74826fe1c25fbce7e3132e44fe9dff3eafcf3a (patch) | |
tree | eaaef64596df2d36109bd1fb80d4709c0bb8f818 /test/CodeGenCXX/microsoft-abi-typeid.cpp | |
parent | dddfaa1e7a54a28fffa56f08456a1fa0ad642ea6 (diff) |
Start setting dso_local for COFF.
With this there are still some GVs where we don't set dso_local
because setGVProperties is never called. I intend to fix that in
followup commits. This is just the bare minimum to teach
shouldAssumeDSOLocal what it should do for COFF.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@325915 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/microsoft-abi-typeid.cpp')
-rw-r--r-- | test/CodeGenCXX/microsoft-abi-typeid.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/test/CodeGenCXX/microsoft-abi-typeid.cpp b/test/CodeGenCXX/microsoft-abi-typeid.cpp index d73f8483a7..3152c31470 100644 --- a/test/CodeGenCXX/microsoft-abi-typeid.cpp +++ b/test/CodeGenCXX/microsoft-abi-typeid.cpp @@ -12,19 +12,19 @@ extern int b; A* fn(); const std::type_info* test0_typeid() { return &typeid(int); } -// CHECK-LABEL: define %struct.type_info* @"\01?test0_typeid@@YAPBUtype_info@@XZ"() +// CHECK-LABEL: define dso_local %struct.type_info* @"\01?test0_typeid@@YAPBUtype_info@@XZ"() // CHECK: ret %struct.type_info* bitcast (%rtti.TypeDescriptor2* @"\01??_R0H@8" to %struct.type_info*) const std::type_info* test1_typeid() { return &typeid(A); } -// CHECK-LABEL: define %struct.type_info* @"\01?test1_typeid@@YAPBUtype_info@@XZ"() +// CHECK-LABEL: define dso_local %struct.type_info* @"\01?test1_typeid@@YAPBUtype_info@@XZ"() // CHECK: ret %struct.type_info* bitcast (%rtti.TypeDescriptor7* @"\01??_R0?AUA@@@8" to %struct.type_info*) const std::type_info* test2_typeid() { return &typeid(&a); } -// CHECK-LABEL: define %struct.type_info* @"\01?test2_typeid@@YAPBUtype_info@@XZ"() +// CHECK-LABEL: define dso_local %struct.type_info* @"\01?test2_typeid@@YAPBUtype_info@@XZ"() // CHECK: ret %struct.type_info* bitcast (%rtti.TypeDescriptor7* @"\01??_R0PAUA@@@8" to %struct.type_info*) const std::type_info* test3_typeid() { return &typeid(*fn()); } -// CHECK-LABEL: define %struct.type_info* @"\01?test3_typeid@@YAPBUtype_info@@XZ"() +// CHECK-LABEL: define dso_local %struct.type_info* @"\01?test3_typeid@@YAPBUtype_info@@XZ"() // CHECK: [[CALL:%.*]] = tail call %struct.A* @"\01?fn@@YAPAUA@@XZ"() // CHECK-NEXT: [[CMP:%.*]] = icmp eq %struct.A* [[CALL]], null // CHECK-NEXT: br i1 [[CMP]] @@ -41,11 +41,11 @@ const std::type_info* test3_typeid() { return &typeid(*fn()); } // CHECK-NEXT: ret %struct.type_info* [[RET]] const std::type_info* test4_typeid() { return &typeid(b); } -// CHECK: define %struct.type_info* @"\01?test4_typeid@@YAPBUtype_info@@XZ"() +// CHECK: define dso_local %struct.type_info* @"\01?test4_typeid@@YAPBUtype_info@@XZ"() // CHECK: ret %struct.type_info* bitcast (%rtti.TypeDescriptor2* @"\01??_R0H@8" to %struct.type_info*) const std::type_info* test5_typeid() { return &typeid(v); } -// CHECK: define %struct.type_info* @"\01?test5_typeid@@YAPBUtype_info@@XZ"() +// CHECK: define dso_local %struct.type_info* @"\01?test5_typeid@@YAPBUtype_info@@XZ"() // CHECK: [[RT:%.*]] = tail call i8* @__RTtypeid(i8* bitcast (%struct.V* @"\01?v@@3UV@@A" to i8*)) // CHECK-NEXT: [[RET:%.*]] = bitcast i8* [[RT]] to %struct.type_info* // CHECK-NEXT: ret %struct.type_info* [[RET]] @@ -63,7 +63,7 @@ void f(const Polymorphic &poly) { typeid(poly); } } -// CHECK-LABEL: define void @"\01?f@PR26329@@YAXABUPolymorphic@1@@Z"( +// CHECK-LABEL: define dso_local void @"\01?f@PR26329@@YAXABUPolymorphic@1@@Z"( // CHECK: %[[cs:.*]] = catchswitch within none [label %{{.*}}] unwind to caller // CHECK: %[[cp:.*]] = catchpad within %[[cs]] [i8* null, i32 64, i8* null] // CHECK: invoke i8* @__RTtypeid(i8* {{.*}}) [ "funclet"(token %[[cp]]) ] |