[opaque pointer type] Pass explicit type to Load instruction creation in AutoUpgrade

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237838 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
David Blaikie
2015-05-20 21:46:30 +00:00
parent e677c7bd22
commit 14a714f727
5 changed files with 24 additions and 13 deletions

View File

@@ -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);