diff options
| author | Nikita Popov <npopov@redhat.com> | 2022-02-14 09:43:59 +0100 |
|---|---|---|
| committer | Nikita Popov <npopov@redhat.com> | 2022-02-14 09:44:37 +0100 |
| commit | ad1feef7b2097090df0d41ad4c35c688dbe1c34a (patch) | |
| tree | 4e70e48fc2584b4b70567d74c3b9339ea80182ed /lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp | |
| parent | e01f624adb0ed5d0f1369b0679a64484bac10d02 (diff) | |
[lldb] Remove some uses of getPointerElementType()
While in the area, remove some uses of getPointerElementType()
that have obvious replacements.
Diffstat (limited to 'lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp')
| -rw-r--r-- | lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp index 0233271172cc..f5c3c139a3ee 100644 --- a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp +++ b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp @@ -187,18 +187,17 @@ static bool fixupX86StructRetCalls(llvm::Module &module) { (new llvm::StoreInst(new_func_cast, new_func_ptr, call_inst)) ->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->getType()->getPointerElementType(), - new_func_ptr, "load_func_pointer", call_inst); + llvm::LoadInst *new_func_addr_load = new llvm::LoadInst( + new_func_ptr_type, 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, "new_func_call", call_inst); 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->getType()->getPointerElementType(), - return_value_alloc, "save_return_val", call_inst); + llvm::LoadInst *lldb_save_result_address = + new llvm::LoadInst(func->getReturnType(), return_value_alloc, + "save_return_val", call_inst); // Now remove the old broken call call_inst->replaceAllUsesWith(lldb_save_result_address); |
