diff options
author | Akira Hatanaka <ahatanaka@apple.com> | 2016-01-15 03:34:06 +0000 |
---|---|---|
committer | Akira Hatanaka <ahatanaka@apple.com> | 2016-01-15 03:34:06 +0000 |
commit | 26907f9236d84d2ccc55a04c8fd1ceb63d34d112 (patch) | |
tree | 463d771a4d96d93018793417947fc3ea0714adea /clang/test/CodeGenCXX | |
parent | 4769517b7b5745853db9cc702862aacce580ac81 (diff) | |
download | bcm5719-llvm-26907f9236d84d2ccc55a04c8fd1ceb63d34d112.tar.gz bcm5719-llvm-26907f9236d84d2ccc55a04c8fd1ceb63d34d112.zip |
[CodeGen] Attach attributes to thread local wrapper function.
This commit is a follow-up to r251734, r251476, and r249735, which fixes
a bug where function attributes were not attached to thread local
wrapper functions.
rdar://problem/20828324
llvm-svn: 257865
Diffstat (limited to 'clang/test/CodeGenCXX')
-rw-r--r-- | clang/test/CodeGenCXX/cxx11-thread-local-reference.cpp | 7 | ||||
-rw-r--r-- | clang/test/CodeGenCXX/cxx11-thread-local.cpp | 4 |
2 files changed, 7 insertions, 4 deletions
diff --git a/clang/test/CodeGenCXX/cxx11-thread-local-reference.cpp b/clang/test/CodeGenCXX/cxx11-thread-local-reference.cpp index 8b2ac5eed80..048a0bd45ad 100644 --- a/clang/test/CodeGenCXX/cxx11-thread-local-reference.cpp +++ b/clang/test/CodeGenCXX/cxx11-thread-local-reference.cpp @@ -21,8 +21,8 @@ int &g() { return r; } // DARWIN: call cxx_fast_tlscc i32* @_ZTW1r() // CHECK: ret i32* %{{.*}} -// LINUX: define weak_odr hidden i32* @_ZTW1r() { -// DARWIN: define cxx_fast_tlscc i32* @_ZTW1r() [[ATTR:#[0-9]+]] { +// LINUX: define weak_odr hidden i32* @_ZTW1r() [[ATTR0:#[0-9]+]] { +// DARWIN: define cxx_fast_tlscc i32* @_ZTW1r() [[ATTR1:#[0-9]+]] { // CHECK: call void @_ZTH1r() // CHECK: load i32*, i32** @r, align 8 // CHECK: ret i32* %{{.*}} @@ -30,4 +30,5 @@ int &g() { return r; } // CHECK-LABEL: define internal void @__tls_init() // CHECK: call void @[[R_INIT]]() -// DARWIN: attributes [[ATTR]] = { nounwind } +// LINUX: attributes [[ATTR0]] = { {{.*}}"target-features"{{.*}} } +// DARWIN: attributes [[ATTR1]] = { {{.*}}nounwind{{.*}}"target-features"{{.*}} } diff --git a/clang/test/CodeGenCXX/cxx11-thread-local.cpp b/clang/test/CodeGenCXX/cxx11-thread-local.cpp index b5bcc5e23ec..40f33e0848b 100644 --- a/clang/test/CodeGenCXX/cxx11-thread-local.cpp +++ b/clang/test/CodeGenCXX/cxx11-thread-local.cpp @@ -217,7 +217,7 @@ void set_anon_i() { // CHECK: } -// LINUX: declare extern_weak void @_ZTH1b() +// LINUX: declare extern_weak void @_ZTH1b() [[ATTR:#[0-9]+]] // LINUX-LABEL: define internal i32* @_ZTWL1d() @@ -229,3 +229,5 @@ void set_anon_i() { // DARWIN-LABEL: define cxx_fast_tlscc i32* @_ZTWN1U1mE() // CHECK: call void @_ZTHN1U1mE() // CHECK: ret i32* @_ZN1U1mE + +// LINUX: attributes [[ATTR]] = { {{.+}} } |