From b341b0861dcfdfd4453b32169a86302a275b81c9 Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Tue, 12 Dec 2006 05:05:00 +0000 Subject: Change inferred getCast into specific getCast. Passes all tests. llvm-svn: 32469 --- llvm/lib/Transforms/IPO/FunctionResolution.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'llvm/lib/Transforms/IPO/FunctionResolution.cpp') diff --git a/llvm/lib/Transforms/IPO/FunctionResolution.cpp b/llvm/lib/Transforms/IPO/FunctionResolution.cpp index f6e8cf59134..6f1eea02767 100644 --- a/llvm/lib/Transforms/IPO/FunctionResolution.cpp +++ b/llvm/lib/Transforms/IPO/FunctionResolution.cpp @@ -103,7 +103,7 @@ static bool ResolveFunctions(Module &M, std::vector &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. -- cgit v1.2.3