diff options
Diffstat (limited to 'lib/VMCore/Verifier.cpp')
-rw-r--r-- | lib/VMCore/Verifier.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/VMCore/Verifier.cpp b/lib/VMCore/Verifier.cpp index c3633ff..fb8db17 100644 --- a/lib/VMCore/Verifier.cpp +++ b/lib/VMCore/Verifier.cpp @@ -254,6 +254,7 @@ namespace { // Anonymous namespace for class void visitUserOp1(Instruction &I); void visitUserOp2(Instruction &I) { visitUserOp1(I); } void visitIntrinsicFunctionCall(Intrinsic::ID ID, CallInst &CI); + void visitAllocationInst(AllocationInst &AI); void VerifyIntrinsicPrototype(Intrinsic::ID ID, Function *F, unsigned Count, ...); @@ -987,6 +988,13 @@ void Verifier::visitStoreInst(StoreInst &SI) { visitInstruction(SI); } +void Verifier::visitAllocationInst(AllocationInst &AI) { + const PointerType *Ptr = AI.getType(); + Assert(Ptr->getAddressSpace() == 0, + "Allocation instruction pointer not in the generic address space!"); + visitInstruction(AI); +} + /// verifyInstruction - Verify that an instruction is well formed. /// |