diff options
author | David Blaikie <dblaikie@gmail.com> | 2015-04-06 20:59:48 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2015-04-06 20:59:48 +0000 |
commit | 15d9a4c49c3198d77ea74e03f71133737d2e91da (patch) | |
tree | 5563651a21ceb3270fd5567d455ce15c4e16b77c /llvm/lib/IR/Instructions.cpp | |
parent | c437888f5af7ab582bfb10a2159c06e07b7cbe57 (diff) | |
download | bcm5719-llvm-15d9a4c49c3198d77ea74e03f71133737d2e91da.tar.gz bcm5719-llvm-15d9a4c49c3198d77ea74e03f71133737d2e91da.zip |
[opaque pointer type] Avoid using PointerType::getElementType when parsing IR
A few calls are left in for error checking - but I'm commenting those
out & trying to build some IR tests (aiming for Argument Promotion to
start with). When I get any of these tests passing I may add flag to
disable the checking so I can add tests that pass with the assertion in
place.
llvm-svn: 234206
Diffstat (limited to 'llvm/lib/IR/Instructions.cpp')
-rw-r--r-- | llvm/lib/IR/Instructions.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/llvm/lib/IR/Instructions.cpp b/llvm/lib/IR/Instructions.cpp index f1dfea956c5..8e3ddaa4b1b 100644 --- a/llvm/lib/IR/Instructions.cpp +++ b/llvm/lib/IR/Instructions.cpp @@ -943,12 +943,10 @@ LoadInst::LoadInst(Value *Ptr, const Twine &Name, bool isVolatile, : LoadInst(Ptr, Name, isVolatile, Align, NotAtomic, CrossThread, InsertAE) { } -LoadInst::LoadInst(Value *Ptr, const Twine &Name, bool isVolatile, +LoadInst::LoadInst(Type *Ty, Value *Ptr, const Twine &Name, bool isVolatile, unsigned Align, AtomicOrdering Order, - SynchronizationScope SynchScope, - Instruction *InsertBef) - : UnaryInstruction(cast<PointerType>(Ptr->getType())->getElementType(), - Load, Ptr, InsertBef) { + SynchronizationScope SynchScope, Instruction *InsertBef) + : UnaryInstruction(Ty, Load, Ptr, InsertBef) { setVolatile(isVolatile); setAlignment(Align); setAtomic(Order, SynchScope); |