mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-17 21:29:20 +00:00
Don't use invalidated use_iterator's. This fixes a crash compiling povray
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@25479 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ecc1a1bb1e
commit
75d3226b5e
@ -166,8 +166,8 @@ Instruction* llvm::UpgradeIntrinsicCall(CallInst *CI) {
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user