[Lldb-commits] [lldb] r118123 - /lldb/trunk/source/Expression/IRForTarget.cpp

Sean Callanan scallanan at apple.com
Tue Nov 2 16:51:18 PDT 2010


Author: spyffe
Date: Tue Nov  2 18:51:17 2010
New Revision: 118123

URL: http://llvm.org/viewvc/llvm-project?rev=118123&view=rev
Log:
Fixed a bug where we left a definition hanging
for a global variable that we had replaced with
a reference to a slot in the input array.

Modified:
    lldb/trunk/source/Expression/IRForTarget.cpp

Modified: lldb/trunk/source/Expression/IRForTarget.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Expression/IRForTarget.cpp?rev=118123&r1=118122&r2=118123&view=diff
==============================================================================
--- lldb/trunk/source/Expression/IRForTarget.cpp (original)
+++ lldb/trunk/source/Expression/IRForTarget.cpp Tue Nov  2 18:51:17 2010
@@ -1103,6 +1103,9 @@
             UnfoldConstant(constant, bit_cast, first_entry_instruction);
         else
             value->replaceAllUsesWith(bit_cast);
+        
+        if (GlobalVariable *var = dyn_cast<GlobalVariable>(value))
+            var->eraseFromParent();
     }
     
     if (log)





More information about the lldb-commits mailing list