[llvm-commits] CVS: llvm/lib/VMCore/Verifier.cpp

Chris Lattner lattner at cs.uiuc.edu
Thu Nov 21 10:55:01 PST 2002


Changes in directory llvm/lib/VMCore:

Verifier.cpp updated: 1.42 -> 1.43

---
Log message:

User defined operators are not supposed to live beyond the lifetime of the 
pass.  Detect and flag them.


---
Diffs of the changes:

Index: llvm/lib/VMCore/Verifier.cpp
diff -u llvm/lib/VMCore/Verifier.cpp:1.42 llvm/lib/VMCore/Verifier.cpp:1.43
--- llvm/lib/VMCore/Verifier.cpp:1.42	Wed Nov 20 12:33:41 2002
+++ llvm/lib/VMCore/Verifier.cpp	Thu Nov 21 10:54:22 2002
@@ -137,6 +137,8 @@
     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 @@
   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) {





More information about the llvm-commits mailing list