Author: Med Ismail Bennani Date: 2020-04-10T00:11:00+02:00 New Revision: 0d525ce068c95a73558ed88ec3a1272c0ffe0e96
URL: https://github.com/llvm/llvm-project/commit/0d525ce068c95a73558ed88ec3a1272c0ffe0e96 DIFF: https://github.com/llvm/llvm-project/commit/0d525ce068c95a73558ed88ec3a1272c0ffe0e96.diff LOG: [lldb] Fix breakeage introduced by llvm::LoadInst api change Added: Modified: lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp Removed: ################################################################################ diff --git a/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp b/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp index b9442872c785..2e16ba38bdde 100644 --- a/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp +++ b/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp @@ -1120,7 +1120,7 @@ bool IRForTarget::RewritePersistentAlloc(llvm::Instruction *persistent_alloc) { // Now, since the variable is a pointer variable, we will drop in a load of // that pointer variable. - LoadInst *persistent_load = new LoadInst(persistent_global, "", alloc); + LoadInst *persistent_load = new LoadInst(persistent_global->getType()->getPointerElementType(), persistent_global, "", alloc); LLDB_LOG(log, "Replacing \"{0}\" with \"{1}\"", PrintValue(alloc), PrintValue(persistent_load)); @@ -1792,7 +1792,7 @@ bool IRForTarget::ReplaceVariables(Function &llvm_function) { get_element_ptr, value->getType()->getPointerTo(), "", entry_instruction); - LoadInst *load = new LoadInst(bit_cast, "", entry_instruction); + LoadInst *load = new LoadInst(bit_cast->getType()->getPointerElementType(), bit_cast, "", entry_instruction); return load; } else { diff --git a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp index 34e362fa489c..73203d163665 100644 --- a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp +++ b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp @@ -189,7 +189,7 @@ bool fixupX86StructRetCalls(llvm::Module &module) { ->setName("new_func_ptr_load_cast"); // load the new function address ready for a jump llvm::LoadInst *new_func_addr_load = - new llvm::LoadInst(new_func_ptr, "load_func_pointer", call_inst); + new llvm::LoadInst(new_func_ptr->getType()->getPointerElementType(), new_func_ptr, "load_func_pointer", call_inst); // and create a callinstruction from it llvm::CallInst *new_call_inst = llvm::CallInst::Create(new_func_type, new_func_addr_load, new_call_args, @@ -197,7 +197,7 @@ bool fixupX86StructRetCalls(llvm::Module &module) { new_call_inst->setCallingConv(call_inst->getCallingConv()); new_call_inst->setTailCall(call_inst->isTailCall()); llvm::LoadInst *lldb_save_result_address = - new llvm::LoadInst(return_value_alloc, "save_return_val", call_inst); + new llvm::LoadInst(return_value_alloc->getType()->getPointerElementType(), return_value_alloc, "save_return_val", call_inst); // Now remove the old broken call call_inst->replaceAllUsesWith(lldb_save_result_address); _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits