[llvm] r344495 - [TI removal] Remove a unnecessary use of `TerminatorInst` from an IR

Chandler Carruth via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 15 02:17:39 PDT 2018


Author: chandlerc
Date: Mon Oct 15 02:17:38 2018
New Revision: 344495

URL: http://llvm.org/viewvc/llvm-project?rev=344495&view=rev
Log:
[TI removal] Remove a unnecessary use of `TerminatorInst` from an IR
header. NFC.

Part of the removal of `TerminatorInst` from the type hierarchy.

Modified:
    llvm/trunk/include/llvm/IR/CFG.h

Modified: llvm/trunk/include/llvm/IR/CFG.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/CFG.h?rev=344495&r1=344494&r2=344495&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/CFG.h (original)
+++ llvm/trunk/include/llvm/IR/CFG.h Mon Oct 15 02:17:38 2018
@@ -73,7 +73,7 @@ public:
 
   inline reference operator*() const {
     assert(!It.atEnd() && "pred_iterator out of range!");
-    return cast<TerminatorInst>(*It)->getParent();
+    return cast<Instruction>(*It)->getParent();
   }
   inline pointer *operator->() const { return &operator*(); }
 




More information about the llvm-commits mailing list