Changes in directory llvm/lib/Linker:
LinkModules.cpp updated: 1.122 -> 1.123 --- Log message: Change inferred getCast into specific getCast. Passes all tests. --- Diffs of the changes: (+6 -6) LinkModules.cpp | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) Index: llvm/lib/Linker/LinkModules.cpp diff -u llvm/lib/Linker/LinkModules.cpp:1.122 llvm/lib/Linker/LinkModules.cpp:1.123 --- llvm/lib/Linker/LinkModules.cpp:1.122 Thu Dec 7 17:41:45 2006 +++ llvm/lib/Linker/LinkModules.cpp Mon Dec 11 23:04:59 2006 @@ -508,7 +508,8 @@ 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 @@ 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 @@ // 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); _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits