Author: Jonas Devlieghere
Date: 2023-01-12T10:51:26-08:00
New Revision: 9ec115978ea2bdfc60800cd3c21264341cdc8b0a

URL: 
https://github.com/llvm/llvm-project/commit/9ec115978ea2bdfc60800cd3c21264341cdc8b0a
DIFF: 
https://github.com/llvm/llvm-project/commit/9ec115978ea2bdfc60800cd3c21264341cdc8b0a.diff

LOG: [lldb] Fix compile error in Lua typemap

Fix error "non-const lvalue reference to type 'lldb::FileSP'  cannot
bind to a value of unrelated type" in Lua typemap.

Added: 
    

Modified: 
    lldb/bindings/lua/lua-typemaps.swig

Removed: 
    


################################################################################
diff  --git a/lldb/bindings/lua/lua-typemaps.swig 
b/lldb/bindings/lua/lua-typemaps.swig
index 15a18deaa3a4a..56756936a532c 100644
--- a/lldb/bindings/lua/lua-typemaps.swig
+++ b/lldb/bindings/lua/lua-typemaps.swig
@@ -247,7 +247,7 @@ LLDB_NUMBER_TYPEMAP(enum SWIGTYPE);
 // Typemap for file handles (e.g. used in SBDebugger::GetOutputFileHandle)
 
 %typemap(out) lldb::FileSP {
-  lldb::FileSP &sp = $1;
+  lldb::FileSP sp = $1;
   if (sp && sp->IsValid()) {
     luaL_Stream *p = (luaL_Stream *)lua_newuserdata(L, sizeof(luaL_Stream));
     p->closef = &LLDBSwigLuaCloseFileHandle;


        
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to