aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/CloneModule.cpp
diff options
context:
space:
mode:
authorMichael Kuperstein <michael.m.kuperstein@intel.com>2014-12-23 08:23:45 +0000
committerMichael Kuperstein <michael.m.kuperstein@intel.com>2014-12-23 08:23:45 +0000
commit0bf33ffde408a846ef803c7e62544ccfd50b872d (patch)
treee07249f94ff74746da437e69cc77cbf1c4c03f2b /llvm/lib/Transforms/Utils/CloneModule.cpp
parent10070626b74059fb01e95766e85d72b7fdb44964 (diff)
downloadllvm-0bf33ffde408a846ef803c7e62544ccfd50b872d.zip
llvm-0bf33ffde408a846ef803c7e62544ccfd50b872d.tar.gz
llvm-0bf33ffde408a846ef803c7e62544ccfd50b872d.tar.bz2
Remove a bad cast in CloneModule()
A cast that was introduced in r209007 was accidentally left in after the changes made to GlobalAlias rules in r210062. This crashes if the aliasee is a now-leggal ConstantExpr. llvm-svn: 224756
Diffstat (limited to 'llvm/lib/Transforms/Utils/CloneModule.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/CloneModule.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/CloneModule.cpp b/llvm/lib/Transforms/Utils/CloneModule.cpp
index d05d251..fae9ff5 100644
--- a/llvm/lib/Transforms/Utils/CloneModule.cpp
+++ b/llvm/lib/Transforms/Utils/CloneModule.cpp
@@ -109,7 +109,7 @@ Module *llvm::CloneModule(const Module *M, ValueToValueMapTy &VMap) {
I != E; ++I) {
GlobalAlias *GA = cast<GlobalAlias>(VMap[I]);
if (const Constant *C = I->getAliasee())
- GA->setAliasee(cast<GlobalObject>(MapValue(C, VMap)));
+ GA->setAliasee(MapValue(C, VMap));
}
// And named metadata....