[llvm] r278339 - getParent()->getParent() == getFunction() ; NFC

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 11 08:16:06 PDT 2016


Author: spatel
Date: Thu Aug 11 10:16:06 2016
New Revision: 278339

URL: http://llvm.org/viewvc/llvm-project?rev=278339&view=rev
Log:
getParent()->getParent() == getFunction() ; NFC

Modified:
    llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp

Modified: llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp?rev=278339&r1=278338&r2=278339&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp (original)
+++ llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp Thu Aug 11 10:16:06 2016
@@ -1280,8 +1280,7 @@ Instruction *InstCombiner::visitCallInst
 
   // If the caller function is nounwind, mark the call as nounwind, even if the
   // callee isn't.
-  if (CI.getParent()->getParent()->doesNotThrow() &&
-      !CI.doesNotThrow()) {
+  if (CI.getFunction()->doesNotThrow() && !CI.doesNotThrow()) {
     CI.setDoesNotThrow();
     return &CI;
   }




More information about the llvm-commits mailing list