summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/Constants.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-08-10 18:16:08 +0000
committerOwen Anderson <resistor@mac.com>2009-08-10 18:16:08 +0000
commit13234f83ac71bef57442bec08b2f5b057698a062 (patch)
tree94323be4563e433cd7c36c928543dc4b64c2a9f4 /llvm/lib/VMCore/Constants.cpp
parent6c20391d380b16700ea05f87847dee02f44a8fbe (diff)
downloadbcm5719-llvm-13234f83ac71bef57442bec08b2f5b057698a062.tar.gz
bcm5719-llvm-13234f83ac71bef57442bec08b2f5b057698a062.zip
Change the MDNode uniquing to a ValueMap, at Devang's request.
llvm-svn: 78577
Diffstat (limited to 'llvm/lib/VMCore/Constants.cpp')
-rw-r--r--llvm/lib/VMCore/Constants.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/VMCore/Constants.cpp b/llvm/lib/VMCore/Constants.cpp
index 161afe47e2a..43cb39016f9 100644
--- a/llvm/lib/VMCore/Constants.cpp
+++ b/llvm/lib/VMCore/Constants.cpp
@@ -1803,7 +1803,7 @@ void ConstantArray::replaceUsesOfWithOnConstant(Value *From, Value *To,
pImpl->ArrayConstants.InsertOrGetItem(Lookup, Exists);
if (Exists) {
- Replacement = I->second;
+ Replacement = cast<Constant>(I->second);
} else {
// Okay, the new shape doesn't exist in the system yet. Instead of
// creating a new constant array, inserting it, replaceallusesof'ing the
@@ -1890,7 +1890,7 @@ void ConstantStruct::replaceUsesOfWithOnConstant(Value *From, Value *To,
pImpl->StructConstants.InsertOrGetItem(Lookup, Exists);
if (Exists) {
- Replacement = I->second;
+ Replacement = cast<Constant>(I->second);
} else {
// Okay, the new shape doesn't exist in the system yet. Instead of
// creating a new constant struct, inserting it, replaceallusesof'ing the
OpenPOWER on IntegriCloud