summaryrefslogtreecommitdiffstats
path: root/lib/Transforms/Instrumentation/AddressSanitizer.cpp
diff options
context:
space:
mode:
authorAlexey Samsonov <samsonov@google.com>2012-11-29 18:27:01 +0000
committerAlexey Samsonov <samsonov@google.com>2012-11-29 18:27:01 +0000
commitd6f62c8da5aa4f3388cec1542309ffa623cac601 (patch)
tree29429f0ab432b642037558213f64b09a8b8da0ef /lib/Transforms/Instrumentation/AddressSanitizer.cpp
parentdff966c9d847075c1f2ed5dd9382d492a90fbcc4 (diff)
downloadexternal_llvm-d6f62c8da5aa4f3388cec1542309ffa623cac601.zip
external_llvm-d6f62c8da5aa4f3388cec1542309ffa623cac601.tar.gz
external_llvm-d6f62c8da5aa4f3388cec1542309ffa623cac601.tar.bz2
[ASan] Simplify check added in r168861. Bail out from module pass early if the module is blacklisted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168913 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Instrumentation/AddressSanitizer.cpp')
-rw-r--r--lib/Transforms/Instrumentation/AddressSanitizer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/Instrumentation/AddressSanitizer.cpp b/lib/Transforms/Instrumentation/AddressSanitizer.cpp
index 4d80408..8ebc5d2 100644
--- a/lib/Transforms/Instrumentation/AddressSanitizer.cpp
+++ b/lib/Transforms/Instrumentation/AddressSanitizer.cpp
@@ -620,6 +620,7 @@ bool AddressSanitizerModule::runOnModule(Module &M) {
if (!TD)
return false;
BL.reset(new BlackList(ClBlackListFile));
+ if (BL->isIn(M)) return false;
DynamicallyInitializedGlobals.Init(M);
C = &(M.getContext());
IntptrTy = Type::getIntNTy(*C, TD->getPointerSizeInBits());
@@ -870,8 +871,7 @@ bool AddressSanitizer::maybeInsertAsanInitAtFunctionEntry(Function &F) {
static bool isNoReturnCall(CallInst *CI) {
if (CI->doesNotReturn()) return true;
Function *F = CI->getCalledFunction();
- if (F && F->doesNotReturn()) return true;
- return false;
+ return (F && F->doesNotReturn());
}
bool AddressSanitizer::runOnFunction(Function &F) {