diff options
| author | Chris Lattner <sabre@nondot.org> | 2004-04-27 15:13:33 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2004-04-27 15:13:33 +0000 |
| commit | 2d3a7a6ff07526222a76f0e8fb6b015c45f5200e (patch) | |
| tree | 7ec456d4a69684c55e6ba5be7e0df6800f31bc51 /llvm/lib/Target | |
| parent | 8bcc86b6aeb1d3c66c65aa85224933428474929b (diff) | |
| download | bcm5719-llvm-2d3a7a6ff07526222a76f0e8fb6b015c45f5200e.tar.gz bcm5719-llvm-2d3a7a6ff07526222a76f0e8fb6b015c45f5200e.zip | |
Changes to fix up the inst_iterator to pass to boost iterator checks. This
patch was graciously contributed by Vladimir Prus.
llvm-svn: 13185
Diffstat (limited to 'llvm/lib/Target')
| -rw-r--r-- | llvm/lib/Target/CBackend/Writer.cpp | 10 | ||||
| -rw-r--r-- | llvm/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp | 8 |
2 files changed, 9 insertions, 9 deletions
diff --git a/llvm/lib/Target/CBackend/Writer.cpp b/llvm/lib/Target/CBackend/Writer.cpp index 807f8ab92f1..09ee36c85bb 100644 --- a/llvm/lib/Target/CBackend/Writer.cpp +++ b/llvm/lib/Target/CBackend/Writer.cpp @@ -955,19 +955,19 @@ void CWriter::printFunction(Function &F) { // print local variable information for the function for (inst_iterator I = inst_begin(&F), E = inst_end(&F); I != E; ++I) - if (const AllocaInst *AI = isDirectAlloca(*I)) { + if (const AllocaInst *AI = isDirectAlloca(&*I)) { Out << " "; printType(Out, AI->getAllocatedType(), Mang->getValueName(AI)); Out << "; /* Address exposed local */\n"; - } else if ((*I)->getType() != Type::VoidTy && !isInlinableInst(**I)) { + } else if (I->getType() != Type::VoidTy && !isInlinableInst(*I)) { Out << " "; - printType(Out, (*I)->getType(), Mang->getValueName(*I)); + printType(Out, I->getType(), Mang->getValueName(&*I)); Out << ";\n"; if (isa<PHINode>(*I)) { // Print out PHI node temporaries as well... Out << " "; - printType(Out, (*I)->getType(), - Mang->getValueName(*I)+"__PHI_TEMPORARY"); + printType(Out, I->getType(), + Mang->getValueName(&*I)+"__PHI_TEMPORARY"); Out << ";\n"; } } diff --git a/llvm/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp b/llvm/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp index 28fc75a8f6c..0f4c4bde932 100644 --- a/llvm/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp +++ b/llvm/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp @@ -1167,9 +1167,9 @@ void PhyRegAlloc::saveState () { unsigned Insn = 0; // Instructions themselves encoded as operand # -1 for (const_inst_iterator II=inst_begin (Fn), IE=inst_end (Fn); II!=IE; ++II){ - saveStateForValue (state, (*II), Insn, -1); - for (unsigned i = 0; i < (*II)->getNumOperands (); ++i) { - const Value *V = (*II)->getOperand (i); + saveStateForValue (state, (&*II), Insn, -1); + for (unsigned i = 0; i < (*II).getNumOperands (); ++i) { + const Value *V = (*II).getOperand (i); // Don't worry about it unless it's something whose reg. we'll need. if (!isa<Argument> (V) && !isa<Instruction> (V)) continue; @@ -1201,7 +1201,7 @@ void PhyRegAlloc::verifySavedState () { } int Insn = 0; for (const_inst_iterator II=inst_begin (Fn), IE=inst_end (Fn); II!=IE; ++II) { - const Instruction *I = *II; + const Instruction *I = &*II; MachineCodeForInstruction &Instrs = MachineCodeForInstruction::get (I); std::cerr << "Instruction: " << *I << "MachineCodeForInstruction:\n"; |

