getParent()->getParent() == getFunction() ; NFC
authorSanjay Patel <spatel@rotateright.com>
Thu, 11 Aug 2016 15:16:06 +0000 (15:16 +0000)
committerSanjay Patel <spatel@rotateright.com>
Thu, 11 Aug 2016 15:16:06 +0000 (15:16 +0000)
llvm-svn: 278339

llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp

index c816661..3b5f92d 100644 (file)
@@ -1280,8 +1280,7 @@ Instruction *InstCombiner::visitCallInst(CallInst &CI) {
 
   // 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;
   }