summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/Verifier.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-02-24 16:58:29 +0000
committerChris Lattner <sabre@nondot.org>2005-02-24 16:58:29 +0000
commit08f7d0c262d2cd99ef429d391df3b69dbfff6e32 (patch)
tree508eb89d56de3fd081d70d5a9a446bc8176c3a42 /llvm/lib/VMCore/Verifier.cpp
parent247a10e72963f877ae69fd9f52672b1d028e98a1 (diff)
downloadbcm5719-llvm-08f7d0c262d2cd99ef429d391df3b69dbfff6e32.tar.gz
bcm5719-llvm-08f7d0c262d2cd99ef429d391df3b69dbfff6e32.zip
Fix some problems where the verifier would crash on invalid input instead of
reporting the problem and exiting. llvm-svn: 20302
Diffstat (limited to 'llvm/lib/VMCore/Verifier.cpp')
-rw-r--r--llvm/lib/VMCore/Verifier.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/VMCore/Verifier.cpp b/llvm/lib/VMCore/Verifier.cpp
index ad1074d8d33..4fae3b72d11 100644
--- a/llvm/lib/VMCore/Verifier.cpp
+++ b/llvm/lib/VMCore/Verifier.cpp
@@ -592,6 +592,7 @@ void Verifier::visitInstruction(Instruction &I) {
for (unsigned i = 0, e = I.getNumOperands(); i != e; ++i) {
// Check to make sure that the "address of" an intrinsic function is never
// taken.
+ Assert1(I.getOperand(i) != 0, "Instruction has null operand!", &I);
if (Function *F = dyn_cast<Function>(I.getOperand(i))) {
Assert1(!F->isIntrinsic() || (i == 0 && isa<CallInst>(I)),
"Cannot take the address of an intrinsic!", &I);
OpenPOWER on IntegriCloud