diff options
| author | Sean Callanan <scallanan@apple.com> | 2010-11-02 23:51:17 +0000 |
|---|---|---|
| committer | Sean Callanan <scallanan@apple.com> | 2010-11-02 23:51:17 +0000 |
| commit | 951f6ce9032ed4b913a9bbf6c3725f77897626c6 (patch) | |
| tree | b3a031fcd300e80fdc421bfcb7cced35e879159a /lldb/source/Expression/IRForTarget.cpp | |
| parent | d0502c177707282151d69f93d09803de29815be6 (diff) | |
| download | bcm5719-llvm-951f6ce9032ed4b913a9bbf6c3725f77897626c6.tar.gz bcm5719-llvm-951f6ce9032ed4b913a9bbf6c3725f77897626c6.zip | |
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.
llvm-svn: 118123
Diffstat (limited to 'lldb/source/Expression/IRForTarget.cpp')
| -rw-r--r-- | lldb/source/Expression/IRForTarget.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lldb/source/Expression/IRForTarget.cpp b/lldb/source/Expression/IRForTarget.cpp index fbb2eda0240..d6d0586b3f2 100644 --- a/lldb/source/Expression/IRForTarget.cpp +++ b/lldb/source/Expression/IRForTarget.cpp @@ -1103,6 +1103,9 @@ IRForTarget::replaceVariables(Module &M, Function &F) UnfoldConstant(constant, bit_cast, first_entry_instruction); else value->replaceAllUsesWith(bit_cast); + + if (GlobalVariable *var = dyn_cast<GlobalVariable>(value)) + var->eraseFromParent(); } if (log) |

