diff options
author | David Blaikie <dblaikie@gmail.com> | 2015-05-20 20:22:31 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2015-05-20 20:22:31 +0000 |
commit | 79009f88b4b0212222986969a6c0f023436cb6e3 (patch) | |
tree | fdf47bdece2da355f59049bc51669d1ad5039ee8 /llvm/lib/IR/Instructions.cpp | |
parent | 92a699c50e0a3d7627634af5a2a850a4b82ac21b (diff) | |
download | bcm5719-llvm-79009f88b4b0212222986969a6c0f023436cb6e3.tar.gz bcm5719-llvm-79009f88b4b0212222986969a6c0f023436cb6e3.zip |
[opaque pointer type] LoadInst: assert that the explicit type matches the implicit one
llvm-svn: 237830
Diffstat (limited to 'llvm/lib/IR/Instructions.cpp')
-rw-r--r-- | llvm/lib/IR/Instructions.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/IR/Instructions.cpp b/llvm/lib/IR/Instructions.cpp index 3a32be542cc..32b7451b074 100644 --- a/llvm/lib/IR/Instructions.cpp +++ b/llvm/lib/IR/Instructions.cpp @@ -953,6 +953,7 @@ LoadInst::LoadInst(Type *Ty, Value *Ptr, const Twine &Name, bool isVolatile, unsigned Align, AtomicOrdering Order, SynchronizationScope SynchScope, Instruction *InsertBef) : UnaryInstruction(Ty, Load, Ptr, InsertBef) { + assert(Ty == cast<PointerType>(Ptr->getType())->getElementType()); setVolatile(isVolatile); setAlignment(Align); setAtomic(Order, SynchScope); |