summaryrefslogtreecommitdiffstats
path: root/test/CodeGen/sanitize-thread-attr.cpp
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2015-05-27 18:47:56 +0000
committerdim <dim@FreeBSD.org>2015-05-27 18:47:56 +0000
commit3191b2b32a96e1a6ee833fcca73e5c8e0c67ba65 (patch)
treedbbd4047878da71c1a706e26ce05b4e7791b14cc /test/CodeGen/sanitize-thread-attr.cpp
parent38d6f2e7f2ce51a5b3836d26596c6c34a3288752 (diff)
downloadFreeBSD-src-3191b2b32a96e1a6ee833fcca73e5c8e0c67ba65.zip
FreeBSD-src-3191b2b32a96e1a6ee833fcca73e5c8e0c67ba65.tar.gz
Vendor import of clang trunk r238337:
https://llvm.org/svn/llvm-project/cfe/trunk@238337
Diffstat (limited to 'test/CodeGen/sanitize-thread-attr.cpp')
-rw-r--r--test/CodeGen/sanitize-thread-attr.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/test/CodeGen/sanitize-thread-attr.cpp b/test/CodeGen/sanitize-thread-attr.cpp
index fe5d810..46cab4d 100644
--- a/test/CodeGen/sanitize-thread-attr.cpp
+++ b/test/CodeGen/sanitize-thread-attr.cpp
@@ -22,6 +22,12 @@ __attribute__((no_sanitize_thread))
int NoTSAN2(int *a);
int NoTSAN2(int *a) { return *a; }
+// WITHOUT: NoTSAN3{{.*}}) [[NOATTR:#[0-9]+]]
+// BL: NoTSAN3{{.*}}) [[NOATTR:#[0-9]+]]
+// TSAN: NoTSAN3{{.*}}) [[NOATTR:#[0-9]+]]
+__attribute__((no_sanitize("thread")))
+int NoTSAN3(int *a) { return *a; }
+
// WITHOUT: TSANOk{{.*}}) [[NOATTR]]
// BL: TSANOk{{.*}}) [[NOATTR]]
// TSAN: TSANOk{{.*}}) [[WITH:#[0-9]+]]
@@ -46,16 +52,13 @@ int force_instance = TemplateTSANOk<42>()
// Check that __cxx_global_var_init* get the sanitize_thread attribute.
int global1 = 0;
int global2 = *(int*)((char*)&global1+1);
-// WITHOUT: @__cxx_global_var_init{{.*}}[[NOATTR_NO_TF:#[0-9]+]]
-// BL: @__cxx_global_var_init{{.*}}[[NOATTR_NO_TF:#[0-9]+]]
-// TSAN: @__cxx_global_var_init{{.*}}[[WITH_NO_TF:#[0-9]+]]
+// WITHOUT: @__cxx_global_var_init{{.*}}[[NOATTR:#[0-9]+]]
+// BL: @__cxx_global_var_init{{.*}}[[NOATTR:#[0-9]+]]
+// TSAN: @__cxx_global_var_init{{.*}}[[WITH:#[0-9]+]]
// WITHOUT: attributes [[NOATTR]] = { nounwind{{.*}} }
-// WITHOUT: attributes [[NOATTR_NO_TF]] = { nounwind }
// BL: attributes [[NOATTR]] = { nounwind{{.*}} }
-// BL: attributes [[NOATTR_NO_TF]] = { nounwind{{.*}} }
// TSAN: attributes [[NOATTR]] = { nounwind{{.*}} }
// TSAN: attributes [[WITH]] = { nounwind sanitize_thread{{.*}} }
-// TSAN: attributes [[WITH_NO_TF]] = { nounwind sanitize_thread }
OpenPOWER on IntegriCloud