summaryrefslogtreecommitdiff
path: root/lib/CodeGen/MachineModuleInfo.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-03-22 23:15:57 +0000
committerChris Lattner <sabre@nondot.org>2010-03-22 23:15:57 +0000
commitea16ea59011ce6d5d9baaab16c33b1457ceab0da (patch)
tree6aeed6a88877c820f4385f6e92464134bd879ca7 /lib/CodeGen/MachineModuleInfo.cpp
parent4a602caf2e973f4446f4eec366124077ce91d06d (diff)
downloadllvm-ea16ea59011ce6d5d9baaab16c33b1457ceab0da.tar.gz
llvm-ea16ea59011ce6d5d9baaab16c33b1457ceab0da.tar.bz2
llvm-ea16ea59011ce6d5d9baaab16c33b1457ceab0da.tar.xz
Fix PR6673: updating the callback should not clear the map.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99227 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/MachineModuleInfo.cpp')
-rw-r--r--lib/CodeGen/MachineModuleInfo.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/CodeGen/MachineModuleInfo.cpp b/lib/CodeGen/MachineModuleInfo.cpp
index af48e9ebb5..ad4f01b7a9 100644
--- a/lib/CodeGen/MachineModuleInfo.cpp
+++ b/lib/CodeGen/MachineModuleInfo.cpp
@@ -44,6 +44,10 @@ public:
MMIAddrLabelMapCallbackPtr() : Map(0) {}
MMIAddrLabelMapCallbackPtr(Value *V) : CallbackVH(V), Map(0) {}
+ void setPtr(BasicBlock *BB) {
+ ValueHandleBase::operator=(BB);
+ }
+
void setMap(MMIAddrLabelMap *map) { Map = map; }
virtual void deleted();
@@ -209,7 +213,7 @@ void MMIAddrLabelMap::UpdateForRAUWBlock(BasicBlock *Old, BasicBlock *New) {
// If New is not address taken, just move our symbol over to it.
if (NewEntry.Symbols.isNull()) {
- BBCallbacks[OldEntry.Index] = New; // Update the callback.
+ BBCallbacks[OldEntry.Index].setPtr(New); // Update the callback.
NewEntry = OldEntry; // Set New's entry.
return;
}