summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2012-01-24 19:34:43 +0000
committerKostya Serebryany <kcc@google.com>2012-01-24 19:34:43 +0000
commitc11d1dd133a26e0c3df0865b36af25e19e57dcf7 (patch)
tree85afb69391bd043cc660c5a01e6d24369f552475 /llvm/lib/Transforms
parentbf740512ec7888defa00296378d9c99d970e3400 (diff)
downloadbcm5719-llvm-c11d1dd133a26e0c3df0865b36af25e19e57dcf7.tar.gz
bcm5719-llvm-c11d1dd133a26e0c3df0865b36af25e19e57dcf7.zip
[asan] enable asan only for the functions that have Attribute::AddressSafety
llvm-svn: 148846
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
index 6ee9550043d..3f0681517e3 100644
--- a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
+++ b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
@@ -608,6 +608,7 @@ bool AddressSanitizer::runOnModule(Module &M) {
bool AddressSanitizer::handleFunction(Module &M, Function &F) {
if (BL->isIn(F)) return false;
if (&F == AsanCtorFunction) return false;
+ if (!F.hasFnAttr(Attribute::AddressSafety)) return false;
if (!ClDebugFunc.empty() && ClDebugFunc != F.getName())
return false;
OpenPOWER on IntegriCloud