diff options
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) |

