summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Linker/LinkModules.cpp
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2006-12-12 05:05:00 +0000
committerReid Spencer <rspencer@reidspencer.com>2006-12-12 05:05:00 +0000
commitb341b0861dcfdfd4453b32169a86302a275b81c9 (patch)
treec407db06dc5ffde18fc136ce1a87da9ede9f33c2 /llvm/lib/Linker/LinkModules.cpp
parent6e5fe376ec898e651526107485d2a0f6e4000789 (diff)
downloadbcm5719-llvm-b341b0861dcfdfd4453b32169a86302a275b81c9.tar.gz
bcm5719-llvm-b341b0861dcfdfd4453b32169a86302a275b81c9.zip
Change inferred getCast into specific getCast. Passes all tests.
llvm-svn: 32469
Diffstat (limited to 'llvm/lib/Linker/LinkModules.cpp')
-rw-r--r--llvm/lib/Linker/LinkModules.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/Linker/LinkModules.cpp b/llvm/lib/Linker/LinkModules.cpp
index 8f8aec1abd9..433dfa682d6 100644
--- a/llvm/lib/Linker/LinkModules.cpp
+++ b/llvm/lib/Linker/LinkModules.cpp
@@ -508,7 +508,8 @@ static bool LinkGlobals(Module *Dest, Module *Src,
DGV->isConstant(), DGV->getLinkage());
NewDGV->setAlignment(DGV->getAlignment());
Dest->getGlobalList().insert(DGV, NewDGV);
- DGV->replaceAllUsesWith(ConstantExpr::getCast(NewDGV, DGV->getType()));
+ DGV->replaceAllUsesWith(
+ ConstantExpr::getBitCast(NewDGV, DGV->getType()));
DGV->eraseFromParent();
NewDGV->setName(SGV->getName());
DGV = NewDGV;
@@ -529,9 +530,8 @@ static bool LinkGlobals(Module *Dest, Module *Src,
SGV->setInitializer(0);
}
- ValueMap.insert(std::make_pair(SGV,
- ConstantExpr::getCast(DGV,
- SGV->getType())));
+ ValueMap.insert(
+ std::make_pair(SGV, ConstantExpr::getBitCast(DGV, SGV->getType())));
}
}
return false;
@@ -807,8 +807,8 @@ static bool LinkAppendingVars(Module *M,
// FIXME: This should rewrite simple/straight-forward uses such as
// getelementptr instructions to not use the Cast!
- G1->replaceAllUsesWith(ConstantExpr::getCast(NG, G1->getType()));
- G2->replaceAllUsesWith(ConstantExpr::getCast(NG, G2->getType()));
+ G1->replaceAllUsesWith(ConstantExpr::getBitCast(NG, G1->getType()));
+ G2->replaceAllUsesWith(ConstantExpr::getBitCast(NG, G2->getType()));
// Remove the two globals from the module now...
M->getGlobalList().erase(G1);
OpenPOWER on IntegriCloud