From 444034783e91143300ba43050a25df2e220ac36d Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Fri, 12 Aug 2011 18:10:19 +0000 Subject: Use ArrayRef. llvm-svn: 137485 --- llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp') diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 76dc43feae9..f5c762b18ea 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -1680,10 +1680,10 @@ void DwarfDebug::endFunction(const MachineFunction *MF) { collectVariableInfo(MF, ProcessedVars); // Construct abstract scopes. - SmallVector &AList = LScopes.getAbstractScopesList(); - for (SmallVector::iterator AI = AList.begin(), - AE = AList.end(); AI != AE; ++AI) { - DISubprogram SP((*AI)->getScopeNode()); + ArrayRef AList = LScopes.getAbstractScopesList(); + for (unsigned i = 0, e = AList.size(); i != e; ++i) { + LexicalScope *AScope = AList[i]; + DISubprogram SP(AScope->getScopeNode()); if (SP.Verify()) { // Collect info for variables that were optimized out. StringRef FName = SP.getLinkageName(); @@ -1700,8 +1700,8 @@ void DwarfDebug::endFunction(const MachineFunction *MF) { } } } - if (ProcessedSPNodes.count((*AI)->getScopeNode()) == 0) - constructScopeDIE(*AI); + if (ProcessedSPNodes.count(AScope->getScopeNode()) == 0) + constructScopeDIE(AScope); } DIE *CurFnDIE = constructScopeDIE(LScopes.getCurrentFunctionScope()); -- cgit v1.2.3