OSDN Git Service

allow branch reversal to fail
authorChris Lattner <sabre@nondot.org>
Fri, 13 Oct 2006 20:59:31 +0000 (20:59 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 13 Oct 2006 20:59:31 +0000 (20:59 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30943 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Target/TargetInstrInfo.h

index e311957..bfe6ad7 100644 (file)
@@ -308,10 +308,11 @@ public:
     assert(0 && "Target didn't implement TargetInstrInfo::RemoveBranch!"); 
   }
   
-  /// Reverses the branch condition of the MachineInstr pointed by
-  /// MI. The instruction is replaced and the new MI is returned.
-  virtual void ReverseBranchCondition(std::vector<MachineOperand> &Cond) const {
-    assert(0 && "Target didn't implement ReverseBranchCondition!");
+  /// ReverseBranchCondition - Reverses the branch condition of the specified
+  /// condition list, returning false on success and true if it cannot be
+  /// reversed.
+  virtual bool ReverseBranchCondition(std::vector<MachineOperand> &Cond) const {
+    return true;
   }
   
   /// insertNoop - Insert a noop into the instruction stream at the specified