commit | 0307b9a88574d7e54459181afaa656ac92971847 | [log] [tgz] |
---|---|---|
author | Kostya Serebryany <kcc@google.com> | Tue Jan 24 19:34:43 2012 +0000 |
committer | Kostya Serebryany <kcc@google.com> | Tue Jan 24 19:34:43 2012 +0000 |
tree | 880ec66a87f2777c0f0a9771c83c934388598512 | |
parent | 88a54de799240d5de2e79dfff4671ad5653e7ceb [diff] [blame] |
[asan] enable asan only for the functions that have Attribute::AddressSafety git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148846 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Transforms/Instrumentation/AddressSanitizer.cpp b/lib/Transforms/Instrumentation/AddressSanitizer.cpp index 6ee9550..3f06815 100644 --- a/lib/Transforms/Instrumentation/AddressSanitizer.cpp +++ b/lib/Transforms/Instrumentation/AddressSanitizer.cpp
@@ -608,6 +608,7 @@ 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;