瀏覽代碼

Nick Lewycky pointed out that this code makes changes unconditionally.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92739 91177308-0d34-0410-b5e6-96231b3b80d8
Dan Gohman 15 年之前
父節點
當前提交
ba25f0924e
共有 1 個文件被更改,包括 2 次插入1 次删除
  1. 2 1
      lib/Transforms/Utils/Local.cpp

+ 2 - 1
lib/Transforms/Utils/Local.cpp

@@ -328,7 +328,8 @@ llvm::RecursivelyDeleteDeadPHINode(PHINode *PN) {
       if (!PHIs.insert(cast<PHINode>(JP))) {
         // Break the cycle and delete the PHI and its operands.
         JP->replaceAllUsesWith(UndefValue::get(JP->getType()));
-        Changed |= RecursivelyDeleteTriviallyDeadInstructions(JP);
+        (void)RecursivelyDeleteTriviallyDeadInstructions(JP);
+        Changed = true;
         break;
       }
   return Changed;