[Lldb-commits] [lldb] r299898 - Update for alloca construction changes

Matt Arsenault via lldb-commits lldb-commits at lists.llvm.org
Mon Apr 10 16:27:53 PDT 2017


Author: arsenm
Date: Mon Apr 10 18:27:53 2017
New Revision: 299898

URL: http://llvm.org/viewvc/llvm-project?rev=299898&view=rev
Log:
Update for alloca construction changes

Modified:
    lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp

Modified: lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp?rev=299898&r1=299897&r2=299898&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp (original)
+++ lldb/trunk/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptx86ABIFixups.cpp Mon Apr 10 18:27:53 2017
@@ -182,8 +182,10 @@ bool fixupX86StructRetCalls(llvm::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
         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");




More information about the lldb-commits mailing list