summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenCXX/vtable-key-function-ios.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2018-02-23 15:32:32 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2018-02-23 15:32:32 +0000
commit004d240b6a8f06227f0e819c15e949ffc5fbd7c2 (patch)
tree54f15eacbda38c0b41ee6f45afe09b1db1548ab7 /clang/test/CodeGenCXX/vtable-key-function-ios.cpp
parent504d23551ee0b995b93f3177fa1728217abcfb53 (diff)
downloadbcm5719-llvm-004d240b6a8f06227f0e819c15e949ffc5fbd7c2.tar.gz
bcm5719-llvm-004d240b6a8f06227f0e819c15e949ffc5fbd7c2.zip
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. llvm-svn: 325915
Diffstat (limited to 'clang/test/CodeGenCXX/vtable-key-function-ios.cpp')
-rw-r--r--clang/test/CodeGenCXX/vtable-key-function-ios.cpp56
1 files changed, 28 insertions, 28 deletions
diff --git a/clang/test/CodeGenCXX/vtable-key-function-ios.cpp b/clang/test/CodeGenCXX/vtable-key-function-ios.cpp
index 8a3466beda4..a119c780bb4 100644
--- a/clang/test/CodeGenCXX/vtable-key-function-ios.cpp
+++ b/clang/test/CodeGenCXX/vtable-key-function-ios.cpp
@@ -28,8 +28,8 @@ struct Test0a {
// V-table should be defined externally.
Test0a::Test0a() { use(typeid(Test0a)); }
-// CHECK: @_ZTV6Test0a = external unnamed_addr constant
-// CHECK: @_ZTI6Test0a = external constant
+// CHECK: @_ZTV6Test0a = external {{(dso_local )?}}unnamed_addr constant
+// CHECK: @_ZTI6Test0a = external {{(dso_local )?}}constant
// This is not a key function.
void Test0a::foo() {}
@@ -47,8 +47,8 @@ void Test0b::foo() {}
// V-table should be defined externally.
Test0b::Test0b() { use(typeid(Test0b)); }
-// CHECK: @_ZTV6Test0b = external unnamed_addr constant
-// CHECK: @_ZTI6Test0b = external constant
+// CHECK: @_ZTV6Test0b = external {{(dso_local )?}}unnamed_addr constant
+// CHECK: @_ZTI6Test0b = external {{(dso_local )?}}constant
/*** Test1a ******************************************************************/
@@ -60,9 +60,9 @@ struct Test1a {
// V-table needs to be defined weakly.
Test1a::Test1a() { use(typeid(Test1a)); }
-// CHECK: @_ZTV6Test1a = linkonce_odr unnamed_addr constant
-// CHECK-LATE: @_ZTS6Test1a = linkonce_odr constant
-// CHECK-LATE: @_ZTI6Test1a = linkonce_odr constant
+// CHECK: @_ZTV6Test1a = linkonce_odr {{(dso_local )?}}unnamed_addr constant
+// CHECK-LATE: @_ZTS6Test1a = linkonce_odr {{(dso_local )?}}constant
+// CHECK-LATE: @_ZTI6Test1a = linkonce_odr {{(dso_local )?}}constant
// This defines the key function.
inline void Test1a::foo() {}
@@ -80,9 +80,9 @@ inline void Test1b::foo() {}
// V-table should be defined weakly..
Test1b::Test1b() { use(typeid(Test1b)); }
-// CHECK: @_ZTV6Test1b = linkonce_odr unnamed_addr constant
-// CHECK: @_ZTS6Test1b = linkonce_odr constant
-// CHECK: @_ZTI6Test1b = linkonce_odr constant
+// CHECK: @_ZTV6Test1b = linkonce_odr {{(dso_local )?}}unnamed_addr constant
+// CHECK: @_ZTS6Test1b = linkonce_odr {{(dso_local )?}}constant
+// CHECK: @_ZTI6Test1b = linkonce_odr {{(dso_local )?}}constant
/*** Test2a ******************************************************************/
@@ -94,9 +94,9 @@ struct Test2a {
// V-table should be defined with weak linkage.
Test2a::Test2a() { use(typeid(Test2a)); }
-// CHECK: @_ZTV6Test2a = linkonce_odr unnamed_addr constant
-// CHECK-LATE: @_ZTS6Test2a = linkonce_odr constant
-// CHECK-LATE: @_ZTI6Test2a = linkonce_odr constant
+// CHECK: @_ZTV6Test2a = linkonce_odr {{(dso_local )?}}unnamed_addr constant
+// CHECK-LATE: @_ZTS6Test2a = linkonce_odr {{(dso_local )?}}constant
+// CHECK-LATE: @_ZTI6Test2a = linkonce_odr {{(dso_local )?}}constant
void Test2a::bar() {}
inline void Test2a::foo() {}
@@ -113,9 +113,9 @@ void Test2b::bar() {}
// V-table should be defined with weak linkage.
Test2b::Test2b() { use(typeid(Test2b)); }
-// CHECK: @_ZTV6Test2b = linkonce_odr unnamed_addr constant
-// CHECK-LATE: @_ZTS6Test2b = linkonce_odr constant
-// CHECK-LATE: @_ZTI6Test2b = linkonce_odr constant
+// CHECK: @_ZTV6Test2b = linkonce_odr {{(dso_local )?}}unnamed_addr constant
+// CHECK-LATE: @_ZTS6Test2b = linkonce_odr {{(dso_local )?}}constant
+// CHECK-LATE: @_ZTI6Test2b = linkonce_odr {{(dso_local )?}}constant
inline void Test2b::foo() {}
@@ -132,9 +132,9 @@ inline void Test2c::foo() {}
// V-table should be defined with weak linkage.
Test2c::Test2c() { use(typeid(Test2c)); }
-// CHECK: @_ZTV6Test2c = linkonce_odr unnamed_addr constant
-// CHECK: @_ZTS6Test2c = linkonce_odr constant
-// CHECK: @_ZTI6Test2c = linkonce_odr constant
+// CHECK: @_ZTV6Test2c = linkonce_odr {{(dso_local )?}}unnamed_addr constant
+// CHECK: @_ZTS6Test2c = linkonce_odr {{(dso_local )?}}constant
+// CHECK: @_ZTI6Test2c = linkonce_odr {{(dso_local )?}}constant
/*** Test3a ******************************************************************/
@@ -146,9 +146,9 @@ struct Test3a {
// V-table should be defined with weak linkage.
Test3a::Test3a() { use(typeid(Test3a)); }
-// CHECK: @_ZTV6Test3a = linkonce_odr unnamed_addr constant
-// CHECK-LATE: @_ZTS6Test3a = linkonce_odr constant
-// CHECK-LATE: @_ZTI6Test3a = linkonce_odr constant
+// CHECK: @_ZTV6Test3a = linkonce_odr {{(dso_local )?}}unnamed_addr constant
+// CHECK-LATE: @_ZTS6Test3a = linkonce_odr {{(dso_local )?}}constant
+// CHECK-LATE: @_ZTI6Test3a = linkonce_odr {{(dso_local )?}}constant
// This defines the key function.
inline void Test3a::bar() {}
@@ -166,9 +166,9 @@ inline void Test3b::bar() {}
// V-table should be defined with weak linkage.
Test3b::Test3b() { use(typeid(Test3b)); }
-// CHECK: @_ZTV6Test3b = linkonce_odr unnamed_addr constant
-// CHECK-LATE: @_ZTS6Test3b = linkonce_odr constant
-// CHECK-LATE: @_ZTI6Test3b = linkonce_odr constant
+// CHECK: @_ZTV6Test3b = linkonce_odr {{(dso_local )?}}unnamed_addr constant
+// CHECK-LATE: @_ZTS6Test3b = linkonce_odr {{(dso_local )?}}constant
+// CHECK-LATE: @_ZTI6Test3b = linkonce_odr {{(dso_local )?}}constant
// This defines the key function.
inline void Test3b::foo() {}
@@ -187,6 +187,6 @@ inline void Test3c::foo() {}
// V-table should be defined with weak linkage.
Test3c::Test3c() { use(typeid(Test3c)); }
-// CHECK: @_ZTV6Test3c = linkonce_odr unnamed_addr constant
-// CHECK: @_ZTS6Test3c = linkonce_odr constant
-// CHECK: @_ZTI6Test3c = linkonce_odr constant
+// CHECK: @_ZTV6Test3c = linkonce_odr {{(dso_local )?}}unnamed_addr constant
+// CHECK: @_ZTS6Test3c = linkonce_odr {{(dso_local )?}}constant
+// CHECK: @_ZTI6Test3c = linkonce_odr {{(dso_local )?}}constant
OpenPOWER on IntegriCloud