[clang codegen][opaque pointers] Remove use of deprecated constructor

(See also D76269.)
This commit is contained in:
Eli Friedman 2020-04-03 14:54:36 -07:00
parent 501ec31b59
commit b11decc221
1 changed files with 2 additions and 1 deletions

View File

@ -309,7 +309,8 @@ static void createStoreInstBefore(llvm::Value *value, Address addr,
static llvm::LoadInst *createLoadInstBefore(Address addr, const Twine &name,
llvm::Instruction *beforeInst) {
auto load = new llvm::LoadInst(addr.getPointer(), name, beforeInst);
auto load = new llvm::LoadInst(addr.getElementType(), addr.getPointer(), name,
beforeInst);
load->setAlignment(addr.getAlignment().getAsAlign());
return load;
}