projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cfa5342
)
[opaque pointer type] LoadInst: assert that the explicit type matches the implicit one
author
David Blaikie
<dblaikie@gmail.com>
Wed, 20 May 2015 20:22:31 +0000
(20:22 +0000)
committer
David Blaikie
<dblaikie@gmail.com>
Wed, 20 May 2015 20:22:31 +0000
(20:22 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237830
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/IR/Instructions.cpp
patch
|
blob
|
history
diff --git
a/lib/IR/Instructions.cpp
b/lib/IR/Instructions.cpp
index 3a32be542cc3a0e65df6f1d91efe7e766346ac10..32b7451b0747ca60bbe07c9f6365050215d75f34 100644
(file)
--- a/
lib/IR/Instructions.cpp
+++ b/
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);