diff options
author | Bill Wendling <isanbard@gmail.com> | 2013-02-28 22:49:57 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2013-02-28 22:49:57 +0000 |
commit | 706469b4530bfeed161e55f006145354b97eada2 (patch) | |
tree | 2fe6a3294f123c4e1da43b125a1aa1c5b271bf50 /clang/test/CodeGen/sanitize-thread-attr.cpp | |
parent | d838bba59b69265933e71cda8532cd5bfc2bf24a (diff) | |
download | bcm5719-llvm-706469b4530bfeed161e55f006145354b97eada2.tar.gz bcm5719-llvm-706469b4530bfeed161e55f006145354b97eada2.zip |
Add more of the command line options as attribute flags.
These can be easily queried by the back-end.
llvm-svn: 176304
Diffstat (limited to 'clang/test/CodeGen/sanitize-thread-attr.cpp')
-rw-r--r-- | clang/test/CodeGen/sanitize-thread-attr.cpp | 48 |
1 files changed, 26 insertions, 22 deletions
diff --git a/clang/test/CodeGen/sanitize-thread-attr.cpp b/clang/test/CodeGen/sanitize-thread-attr.cpp index 2dec3c48c6e..fe5d81026db 100644 --- a/clang/test/CodeGen/sanitize-thread-attr.cpp +++ b/clang/test/CodeGen/sanitize-thread-attr.cpp @@ -9,33 +9,33 @@ // when ThreadSanitizer is enabled, unless no_sanitize_thread attribute // is present. -// WITHOUT: NoTSAN1{{.*}}) #[[NOATTR:[0-9]+]] -// BL: NoTSAN1{{.*}}) #[[NOATTR:[0-9]+]] -// TSAN: NoTSAN1{{.*}}) #[[NOATTR:[0-9]+]] +// WITHOUT: NoTSAN1{{.*}}) [[NOATTR:#[0-9]+]] +// BL: NoTSAN1{{.*}}) [[NOATTR:#[0-9]+]] +// TSAN: NoTSAN1{{.*}}) [[NOATTR:#[0-9]+]] __attribute__((no_sanitize_thread)) int NoTSAN1(int *a) { return *a; } -// WITHOUT: NoTSAN2{{.*}}) #[[NOATTR]] -// BL: NoTSAN2{{.*}}) #[[NOATTR]] -// TSAN: NoTSAN2{{.*}}) #[[NOATTR]] +// WITHOUT: NoTSAN2{{.*}}) [[NOATTR]] +// BL: NoTSAN2{{.*}}) [[NOATTR]] +// TSAN: NoTSAN2{{.*}}) [[NOATTR]] __attribute__((no_sanitize_thread)) int NoTSAN2(int *a); int NoTSAN2(int *a) { return *a; } -// WITHOUT: TSANOk{{.*}}) #[[NOATTR]] -// BL: TSANOk{{.*}}) #[[NOATTR]] -// TSAN: TSANOk{{.*}}) #[[WITH:[0-9]+]] +// WITHOUT: TSANOk{{.*}}) [[NOATTR]] +// BL: TSANOk{{.*}}) [[NOATTR]] +// TSAN: TSANOk{{.*}}) [[WITH:#[0-9]+]] int TSANOk(int *a) { return *a; } -// WITHOUT: TemplateTSANOk{{.*}}) #[[NOATTR]] -// BL: TemplateTSANOk{{.*}}) #[[NOATTR]] -// TSAN: TemplateTSANOk{{.*}}) #[[WITH]] +// WITHOUT: TemplateTSANOk{{.*}}) [[NOATTR]] +// BL: TemplateTSANOk{{.*}}) [[NOATTR]] +// TSAN: TemplateTSANOk{{.*}}) [[WITH]] template<int i> int TemplateTSANOk() { return i; } -// WITHOUT: TemplateNoTSAN{{.*}}) #[[NOATTR]] -// BL: TemplateNoTSAN{{.*}}) #[[NOATTR]] -// TSAN: TemplateNoTSAN{{.*}}) #[[NOATTR]] +// WITHOUT: TemplateNoTSAN{{.*}}) [[NOATTR]] +// BL: TemplateNoTSAN{{.*}}) [[NOATTR]] +// TSAN: TemplateNoTSAN{{.*}}) [[NOATTR]] template<int i> __attribute__((no_sanitize_thread)) int TemplateNoTSAN() { return i; } @@ -46,12 +46,16 @@ 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]] -// BL: @__cxx_global_var_init{{.*}}#[[NOATTR]] -// TSAN: @__cxx_global_var_init{{.*}}#[[WITH]] +// 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: attributes #[[NOATTR]] = { nounwind{{.*}} } -// BL: attributes #[[NOATTR]] = { nounwind{{.*}} } +// WITHOUT: attributes [[NOATTR]] = { nounwind{{.*}} } +// WITHOUT: attributes [[NOATTR_NO_TF]] = { nounwind } -// TSAN: attributes #[[NOATTR]] = { nounwind{{.*}} } -// TSAN: attributes #[[WITH]] = { nounwind{{.*}} sanitize_thread +// 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 } |