diff options
author | Matt Arsenault <Matthew.Arsenault@amd.com> | 2017-04-10 23:27:53 +0000 |
---|---|---|
committer | Matt Arsenault <Matthew.Arsenault@amd.com> | 2017-04-10 23:27:53 +0000 |
commit | 75696ffa2533abb4e4db406d4e2de42e86197413 (patch) | |
tree | 770bf584af8ff885c1253f188908a37751519503 | |
parent | 8f2001164a93c28bec33dbb9796bd76fac941ab3 (diff) | |
download | bcm5719-llvm-75696ffa2533abb4e4db406d4e2de42e86197413.tar.gz bcm5719-llvm-75696ffa2533abb4e4db406d4e2de42e86197413.zip |
Update for alloca construction changes
llvm-svn: 299898
-rw-r--r-- | lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp index 0e475e0b3d7..3ceda5ff67e 100644 --- a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp +++ b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp @@ -182,8 +182,10 @@ bool fixupX86StructRetCalls(llvm::Module &module) { // we pass a pointer to this allocation as the StructRet param, and then // copy its // value into the lldb return value + const llvm::DataLayout &DL = module.getDataLayout(); llvm::AllocaInst *return_value_alloc = new llvm::AllocaInst( - func->getReturnType(), "var_vector_return_alloc", call_inst); + func->getReturnType(), DL.getAllocaAddrSpace(), "var_vector_return_alloc", + call_inst); // use the new allocation as the new first argument new_call_args.emplace(new_call_args.begin(), llvm::cast<llvm::Value>(return_value_alloc)); @@ -194,7 +196,8 @@ bool fixupX86StructRetCalls(llvm::Module &module) { llvm::Instruction::BitCast, func, new_func_ptr_type); // create an allocation for a new function pointer llvm::AllocaInst *new_func_ptr = - new llvm::AllocaInst(new_func_ptr_type, "new_func_ptr", call_inst); + new llvm::AllocaInst(new_func_ptr_type, DL.getAllocaAddrSpace(), + "new_func_ptr", call_inst); // store the new_func_cast to the newly allocated space (new llvm::StoreInst(new_func_cast, new_func_ptr, call_inst)) ->setName("new_func_ptr_load_cast"); |