[llvm-commits] CVS: llvm/lib/VMCore/AutoUpgrade.cpp
Chris Lattner
lattner at cs.uiuc.edu
Fri Jan 20 10:01:53 PST 2006
Changes in directory llvm/lib/VMCore:
AutoUpgrade.cpp updated: 1.4 -> 1.5
---
Log message:
Don't use invalidated use_iterator's. This fixes a crash compiling povray
---
Diffs of the changes: (+2 -2)
AutoUpgrade.cpp | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
Index: llvm/lib/VMCore/AutoUpgrade.cpp
diff -u llvm/lib/VMCore/AutoUpgrade.cpp:1.4 llvm/lib/VMCore/AutoUpgrade.cpp:1.5
--- llvm/lib/VMCore/AutoUpgrade.cpp:1.4 Thu Jan 19 01:00:29 2006
+++ llvm/lib/VMCore/AutoUpgrade.cpp Fri Jan 20 12:01:41 2006
@@ -166,8 +166,8 @@
bool llvm::UpgradeCallsToIntrinsic(Function* F) {
if (Function* newF = UpgradeIntrinsicFunction(F)) {
for (Value::use_iterator UI = F->use_begin(), UE = F->use_end();
- UI != UE; ++UI) {
- if (CallInst* CI = dyn_cast<CallInst>(*UI)) {
+ UI != UE; UI) {
+ if (CallInst* CI = dyn_cast<CallInst>(*UI++)) {
std::vector<Value*> Oprnds;
User::op_iterator OI = CI->op_begin();
++OI;
More information about the llvm-commits
mailing list