summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/Instructions.cpp
diff options
context:
space:
mode:
authorDavid Blaikie <dblaikie@gmail.com>2015-05-20 21:46:30 +0000
committerDavid Blaikie <dblaikie@gmail.com>2015-05-20 21:46:30 +0000
commit0c28fd7fda3d9e58d9efefb63a249e0270ef7ba4 (patch)
tree124fe05e94b8cb9ea7184eb349c3eab966be3dd6 /llvm/lib/IR/Instructions.cpp
parent141b2891cb5d8cdaed5da000a737b42af164fade (diff)
downloadbcm5719-llvm-0c28fd7fda3d9e58d9efefb63a249e0270ef7ba4.tar.gz
bcm5719-llvm-0c28fd7fda3d9e58d9efefb63a249e0270ef7ba4.zip
[opaque pointer type] Pass explicit type to Load instruction creation in AutoUpgrade
llvm-svn: 237838
Diffstat (limited to 'llvm/lib/IR/Instructions.cpp')
-rw-r--r--llvm/lib/IR/Instructions.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/IR/Instructions.cpp b/llvm/lib/IR/Instructions.cpp
index 32b7451b074..571eeea5f23 100644
--- a/llvm/lib/IR/Instructions.cpp
+++ b/llvm/lib/IR/Instructions.cpp
@@ -931,9 +931,9 @@ LoadInst::LoadInst(Value *Ptr, const Twine &Name, Instruction *InsertBef)
LoadInst::LoadInst(Value *Ptr, const Twine &Name, BasicBlock *InsertAE)
: LoadInst(Ptr, Name, /*isVolatile=*/false, InsertAE) {}
-LoadInst::LoadInst(Value *Ptr, const Twine &Name, bool isVolatile,
+LoadInst::LoadInst(Type *Ty, Value *Ptr, const Twine &Name, bool isVolatile,
Instruction *InsertBef)
- : LoadInst(Ptr, Name, isVolatile, /*Align=*/0, InsertBef) {}
+ : LoadInst(Ty, Ptr, Name, isVolatile, /*Align=*/0, InsertBef) {}
LoadInst::LoadInst(Value *Ptr, const Twine &Name, bool isVolatile,
BasicBlock *InsertAE)
@@ -994,10 +994,10 @@ LoadInst::LoadInst(Value *Ptr, const char *Name, BasicBlock *InsertAE)
if (Name && Name[0]) setName(Name);
}
-LoadInst::LoadInst(Value *Ptr, const char *Name, bool isVolatile,
+LoadInst::LoadInst(Type *Ty, Value *Ptr, const char *Name, bool isVolatile,
Instruction *InsertBef)
-: UnaryInstruction(cast<PointerType>(Ptr->getType())->getElementType(),
- Load, Ptr, InsertBef) {
+ : UnaryInstruction(Ty, Load, Ptr, InsertBef) {
+ assert(Ty == cast<PointerType>(Ptr->getType())->getElementType());
setVolatile(isVolatile);
setAlignment(0);
setAtomic(NotAtomic);
OpenPOWER on IntegriCloud