void FrameEntry::dumpInstructions(raw_ostream &OS) const {
// TODO: at the moment only instruction names are dumped. Expand this to
// dump operands as well.
- for (std::vector<Instruction>::const_iterator I = Instructions.begin(),
- E = Instructions.end();
- I != E; ++I) {
- uint8_t Opcode = I->Opcode;
+ for (const auto &Instr : Instructions) {
+ uint8_t Opcode = Instr.Opcode;
if (Opcode & DWARF_CFI_PRIMARY_OPCODE_MASK)
Opcode &= DWARF_CFI_PRIMARY_OPCODE_MASK;
OS << " " << CallFrameString(Opcode) << ":\n";
DWARFDebugFrame::~DWARFDebugFrame() {
- for (EntryVector::iterator I = Entries.begin(), E = Entries.end();
- I != E; ++I) {
- delete *I;
+ for (const auto &Entry : Entries) {
+ delete Entry;
}
}
void DWARFDebugFrame::dump(raw_ostream &OS) const {
OS << "\n";
- for (EntryVector::const_iterator I = Entries.begin(), E = Entries.end();
- I != E; ++I) {
- FrameEntry *Entry = *I;
+ for (const auto &Entry : Entries) {
Entry->dumpHeader(OS);
Entry->dumpInstructions(OS);
OS << "\n";