Unify clang/llvm attributes for asan/tsan/msan (Clang part)
authorKostya Serebryany <kcc@google.com>
Tue, 26 Feb 2013 06:58:27 +0000 (06:58 +0000)
committerKostya Serebryany <kcc@google.com>
Tue, 26 Feb 2013 06:58:27 +0000 (06:58 +0000)
commit4c0fc9931e5af027bee100a26062fe40283727ee
treeecf1ed318b3f90b425b5dd7c66ce8a68d61ad862
parentcf880b94434ddfcba2d5c7b0deb588591b0d8a08
Unify clang/llvm attributes for asan/tsan/msan (Clang part)

These are two related changes (one in llvm, one in clang).
LLVM:
- rename address_safety => sanitize_address (the enum value is the same, so we preserve binary compatibility with old bitcode)
- rename thread_safety => sanitize_thread
- rename no_uninitialized_checks -> sanitize_memory

CLANG:
- add __attribute__((no_sanitize_address)) as a synonym for __attribute__((no_address_safety_analysis))
- add __attribute__((no_sanitize_thread))
- add __attribute__((no_sanitize_memory))

for S in address thread memory
If -fsanitize=S is present and __attribute__((no_sanitize_S)) is not
set llvm attribute sanitize_S

llvm-svn: 176076
14 files changed:
clang/docs/AddressSanitizer.rst
clang/docs/LanguageExtensions.rst
clang/docs/MemorySanitizer.rst
clang/docs/ThreadSanitizer.rst
clang/include/clang/Basic/Attr.td
clang/lib/CodeGen/CGDeclCXX.cpp
clang/lib/CodeGen/CodeGenModule.cpp
clang/lib/Sema/SemaDeclAttr.cpp
clang/test/CodeGen/address-safety-attr.cpp
clang/test/CodeGen/sanitize-thread-attr.cpp [new file with mode: 0644]
clang/test/CodeGenObjCXX/address-safety-attr.mm
clang/test/SemaCXX/attr-no-sanitize-address.cpp [new file with mode: 0644]
clang/test/SemaCXX/attr-no-sanitize-memory.cpp [new file with mode: 0644]
clang/test/SemaCXX/attr-no-sanitize-thread.cpp [new file with mode: 0644]