[llvm-commits] [llvm] r168913 - /llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp

Alexey Samsonov samsonov at google.com
Thu Nov 29 10:27:01 PST 2012


Author: samsonov
Date: Thu Nov 29 12:27:01 2012
New Revision: 168913

URL: http://llvm.org/viewvc/llvm-project?rev=168913&view=rev
Log:
[ASan] Simplify check added in r168861. Bail out from module pass early if the module is blacklisted.

Modified:
    llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp

Modified: llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp?rev=168913&r1=168912&r2=168913&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp (original)
+++ llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp Thu Nov 29 12:27:01 2012
@@ -620,6 +620,7 @@
   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 @@
 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) {





More information about the llvm-commits mailing list