summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit9a956e8cd2fc01ef20016758cecb3144574eae98 (patch)
treeb9bf9980b14dab85710f5790289512e4de816446 /llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
parent76561e9741893d371204551b13a550baab5dfb28 (diff)
downloadbcm5719-llvm-9a956e8cd2fc01ef20016758cecb3144574eae98.tar.gz
bcm5719-llvm-9a956e8cd2fc01ef20016758cecb3144574eae98.zip
[ASan] Simplify check added in r168861. Bail out from module pass early if the module is blacklisted.
llvm-svn: 168913
Diffstat (limited to 'llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp')
-rw-r--r--llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp b/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
index 4d8040834ed..8ebc5d25e9f 100644
--- a/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
+++ b/llvm/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) {
OpenPOWER on IntegriCloud