diff options
| author | Sean Callanan <scallanan@apple.com> | 2010-07-27 01:17:28 +0000 |
|---|---|---|
| committer | Sean Callanan <scallanan@apple.com> | 2010-07-27 01:17:28 +0000 |
| commit | b27a62fd13f60de05dafeb2725c65bbbdd7cb186 (patch) | |
| tree | 8c0406e1fb010f61a484c1d1d5eedcade041e985 /lldb/source/Expression/IRForTarget.cpp | |
| parent | 8ade104a0a10442b83347e21da001f0a26a73785 (diff) | |
| download | bcm5719-llvm-b27a62fd13f60de05dafeb2725c65bbbdd7cb186.tar.gz bcm5719-llvm-b27a62fd13f60de05dafeb2725c65bbbdd7cb186.zip | |
Fixed a bug in the IR transformer where we were
trying to do replaceUsesOfWith on a constant,
which doesn't work. Turns out we don't need to
do anything for constants.
llvm-svn: 109477
Diffstat (limited to 'lldb/source/Expression/IRForTarget.cpp')
| -rw-r--r-- | lldb/source/Expression/IRForTarget.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lldb/source/Expression/IRForTarget.cpp b/lldb/source/Expression/IRForTarget.cpp index e201117338b..ce28a8f362c 100644 --- a/lldb/source/Expression/IRForTarget.cpp +++ b/lldb/source/Expression/IRForTarget.cpp @@ -186,7 +186,16 @@ static void TurnGuardLoadIntoZero(Instruction* guard_load, Module &M) for (ui = guard_load->use_begin(); ui != guard_load->use_end(); ++ui) - ui->replaceUsesOfWith(guard_load, zero); + { + if (isa<Constant>(ui)) + { + // do nothing for the moment + } + else + { + ui->replaceUsesOfWith(guard_load, zero); + } + } guard_load->eraseFromParent(); } |

