diff options
author | Chris Lattner <sabre@nondot.org> | 2002-11-21 16:54:22 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2002-11-21 16:54:22 +0000 |
commit | 627079d42a1340360f8699cd87865e20799cff21 (patch) | |
tree | 7edfe11d3e0cfcdf8eef61cdac6f5ca468b7904a /lib | |
parent | 4b4e9dd93794a871e7a27ab8db2b0720e970efc5 (diff) | |
download | external_llvm-627079d42a1340360f8699cd87865e20799cff21.zip external_llvm-627079d42a1340360f8699cd87865e20799cff21.tar.gz external_llvm-627079d42a1340360f8699cd87865e20799cff21.tar.bz2 |
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
Diffstat (limited to 'lib')
-rw-r--r-- | lib/VMCore/Verifier.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/VMCore/Verifier.cpp b/lib/VMCore/Verifier.cpp index 812ca4a..145a66c 100644 --- a/lib/VMCore/Verifier.cpp +++ b/lib/VMCore/Verifier.cpp @@ -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) { |