User defined operators are not supposed to live beyond the lifetime of the
[oota-llvm.git] / lib / VMCore / Verifier.cpp
index 812ca4a86845d5c4720cb5112e064974be9b416c..145a66caf533a4108377ce33cf560026af518b8e 100644 (file)
@@ -137,6 +137,8 @@ namespace {  // Anonymous namespace for class
     void visitInstruction(Instruction &I);
     void visitTerminatorInst(TerminatorInst &I);
     void visitReturnInst(ReturnInst &RI);
+    void visitUserOp1(Instruction &I);
+    void visitUserOp2(Instruction &I) { visitUserOp1(I); }
 
     // CheckFailed - A check failed, so print out the condition and the message
     // that failed.  This provides a nice place to put a breakpoint if you want
@@ -248,6 +250,13 @@ void Verifier::visitReturnInst(ReturnInst &RI) {
   visitTerminatorInst(RI);
 }
 
+// visitUserOp1 - User defined operators shouldn't live beyond the lifetime of a
+// pass, if any exist, it's an error.
+//
+void Verifier::visitUserOp1(Instruction &I) {
+  Assert1(0, "User-defined operators should not live outside of a pass!",
+          &I);
+}
 
 // visitPHINode - Ensure that a PHI node is well formed.
 void Verifier::visitPHINode(PHINode &PN) {