mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-12 01:25:49 +00:00
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224756 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -109,7 +109,7 @@ Module *llvm::CloneModule(const Module *M, ValueToValueMapTy &VMap) {
|
|||||||
I != E; ++I) {
|
I != E; ++I) {
|
||||||
GlobalAlias *GA = cast<GlobalAlias>(VMap[I]);
|
GlobalAlias *GA = cast<GlobalAlias>(VMap[I]);
|
||||||
if (const Constant *C = I->getAliasee())
|
if (const Constant *C = I->getAliasee())
|
||||||
GA->setAliasee(cast<GlobalObject>(MapValue(C, VMap)));
|
GA->setAliasee(MapValue(C, VMap));
|
||||||
}
|
}
|
||||||
|
|
||||||
// And named metadata....
|
// And named metadata....
|
||||||
|
Reference in New Issue
Block a user