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

Kostya Serebryany kcc at google.com
Fri Nov 30 03:08:59 PST 2012


Author: kcc
Date: Fri Nov 30 05:08:59 2012
New Revision: 168995

URL: http://llvm.org/viewvc/llvm-project?rev=168995&view=rev
Log:
[asan] simplify the code around doesNotReturn call. It now magically works. 

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=168995&r1=168994&r2=168995&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp (original)
+++ llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp Fri Nov 30 05:08:59 2012
@@ -867,13 +867,6 @@
   return false;
 }
 
-// Check both the call and the callee for doesNotReturn().
-static bool isNoReturnCall(CallInst *CI) {
-  if (CI->doesNotReturn()) return true;
-  Function *F = CI->getCalledFunction();
-  return (F && F->doesNotReturn());
-}
-
 bool AddressSanitizer::runOnFunction(Function &F) {
   if (BL->isIn(F)) return false;
   if (&F == AsanCtorFunction) return false;
@@ -915,7 +908,7 @@
         if (CallInst *CI = dyn_cast<CallInst>(BI)) {
           // A call inside BB.
           TempsToInstrument.clear();
-          if (isNoReturnCall(CI)) {
+          if (CI->doesNotReturn()) {
             NoReturnCalls.push_back(CI);
           }
         }





More information about the llvm-commits mailing list