User defined operators are not supposed to live beyond the lifetime of the

pass.  Detect and flag them.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4801 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2002-11-21 16:54:22 +00:00
parent 4b4e9dd937
commit 627079d42a

View 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) {