[ASan] Simplify check added in r168861. Bail out from module pass early if the module...
authorAlexey Samsonov <samsonov@google.com>
Thu, 29 Nov 2012 18:27:01 +0000 (18:27 +0000)
committerAlexey Samsonov <samsonov@google.com>
Thu, 29 Nov 2012 18:27:01 +0000 (18:27 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168913 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Instrumentation/AddressSanitizer.cpp

index 4d8040834ed008ca40493074df49c79e5a9027dc..8ebc5d25e9f7652e487312af0f282a40cf49f10e 100644 (file)
@@ -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) {