diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2006-12-12 05:05:00 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2006-12-12 05:05:00 +0000 |
commit | 4da49122f3f3c8da68a52723d846b88c72166a68 (patch) | |
tree | a7cb69a70439f795df63c88c5d56200e3ae17be6 /lib/Transforms/IPO/FunctionResolution.cpp | |
parent | a30fc5ed0430081f6495b33e027b7655ca2a66e5 (diff) |
Change inferred getCast into specific getCast. Passes all tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32469 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/IPO/FunctionResolution.cpp')
-rw-r--r-- | lib/Transforms/IPO/FunctionResolution.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Transforms/IPO/FunctionResolution.cpp b/lib/Transforms/IPO/FunctionResolution.cpp index f6e8cf5913..6f1eea0276 100644 --- a/lib/Transforms/IPO/FunctionResolution.cpp +++ b/lib/Transforms/IPO/FunctionResolution.cpp @@ -103,7 +103,7 @@ static bool ResolveFunctions(Module &M, std::vector<GlobalValue*> &Globals, if (!Old->use_empty()) { Value *Replacement = Concrete; if (Concrete->getType() != Old->getType()) - Replacement = ConstantExpr::getCast(Concrete, Old->getType()); + Replacement = ConstantExpr::getBitCast(Concrete, Old->getType()); NumResolved += Old->getNumUses(); Old->replaceAllUsesWith(Replacement); } @@ -122,7 +122,7 @@ static bool ResolveGlobalVariables(Module &M, for (unsigned i = 0; i != Globals.size(); ++i) if (Globals[i] != Concrete) { - Constant *Cast = ConstantExpr::getCast(Concrete, Globals[i]->getType()); + Constant *Cast = ConstantExpr::getBitCast(Concrete,Globals[i]->getType()); Globals[i]->replaceAllUsesWith(Cast); // Since there are no uses of Old anymore, remove it from the module. |