[llvm-commits] CVS: llvm/lib/Transforms/IPO/FunctionResolution.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sat May 31 15:34:01 PDT 2003
Changes in directory llvm/lib/Transforms/IPO:
FunctionResolution.cpp updated: 1.27 -> 1.28
---
Log message:
Fix bug: FunctionResolve/2003-05-31-FuncPointerResolve.ll
---
Diffs of the changes:
Index: llvm/lib/Transforms/IPO/FunctionResolution.cpp
diff -u llvm/lib/Transforms/IPO/FunctionResolution.cpp:1.27 llvm/lib/Transforms/IPO/FunctionResolution.cpp:1.28
--- llvm/lib/Transforms/IPO/FunctionResolution.cpp:1.27 Wed May 21 15:51:52 2003
+++ llvm/lib/Transforms/IPO/FunctionResolution.cpp Sat May 31 15:33:31 2003
@@ -188,17 +188,9 @@
++i;
}
} else if (ConstantPointerRef *CPR = dyn_cast<ConstantPointerRef>(U)) {
- if (CPR->use_size() == 1 && isa<ConstantExpr>(CPR->use_back()) &&
- cast<ConstantExpr>(CPR->use_back())->getOpcode() ==
- Instruction::Cast) {
- ConstantExpr *CE = cast<ConstantExpr>(CPR->use_back());
- Constant *NewCPR = ConstantPointerRef::get(Concrete);
- CE->replaceAllUsesWith(ConstantExpr::getCast(NewCPR,CE->getType()));
- CPR->destroyConstant();
- } else {
- std::cerr << "Cannot convert use of function: " << CPR << "\n";
- ++i;
- }
+ Constant *NewCPR = ConstantPointerRef::get(Concrete);
+ CPR->replaceAllUsesWith(ConstantExpr::getCast(NewCPR,CPR->getType()));
+ CPR->destroyConstant();
} else {
std::cerr << "Cannot convert use of function: " << U << "\n";
++i;
More information about the llvm-commits
mailing list