aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/AttributeList.cpp
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2012-01-24 19:25:38 +0000
committerKostya Serebryany <kcc@google.com>2012-01-24 19:25:38 +0000
commit71efba0bbafaefab14419fbd284efff5f7acade7 (patch)
tree0e1a4b575a21aa22ff23d2e9974809ceaf1e97ca /lib/Sema/AttributeList.cpp
parent5d84bb418405e1256020a66895d163756886b102 (diff)
The following patch adds __attribute__((no_address_safety_analysis)) which will allow to disable
address safety analysis (such as e.g. AddressSanitizer or SAFECode) for a specific function. When building with AddressSanitizer, add AddressSafety function attribute to every generated function except for those that have __attribute__((no_address_safety_analysis)). With this patch we will be able to 1. disable AddressSanitizer for a particular function 2. disable AddressSanitizer-hostile optimizations (such as some cases of load widening) when AddressSanitizer is on. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148842 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/AttributeList.cpp')
-rw-r--r--lib/Sema/AttributeList.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/Sema/AttributeList.cpp b/lib/Sema/AttributeList.cpp
index c184676b9e..a3791dedf7 100644
--- a/lib/Sema/AttributeList.cpp
+++ b/lib/Sema/AttributeList.cpp
@@ -218,6 +218,7 @@ AttributeList::Kind AttributeList::getKind(const IdentifierInfo *Name) {
.Case("pt_guarded_var", AT_pt_guarded_var)
.Case("scoped_lockable", AT_scoped_lockable)
.Case("lockable", AT_lockable)
+ .Case("no_address_safety_analysis", AT_no_address_safety_analysis)
.Case("no_thread_safety_analysis", AT_no_thread_safety_analysis)
.Case("guarded_by", AT_guarded_by)
.Case("pt_guarded_by", AT_pt_guarded_by)