From 2b4a201ba626e9ee91a3eece2b80de3948853c56 Mon Sep 17 00:00:00 2001 From: Craig Topper Date: Wed, 3 Jul 2013 04:40:27 +0000 Subject: Introduce some typedefs for DenseMaps containing SmallVectors so the vector size doesn't have to repeated when creating iterators for the DenseMap. llvm-svn: 185508 --- llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 8 +++----- llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h | 8 ++++++-- 2 files changed, 9 insertions(+), 7 deletions(-) (limited to 'llvm/lib/CodeGen') diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 52f889f97cc..ed2cb8e3f91 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -547,8 +547,7 @@ DIE *DwarfDebug::constructInlinedScopeDIE(CompileUnit *TheCU, // corresponding the .debug_inlined section entry for this pair. if (Asm->MAI->doesDwarfUseInlineInfoSection()) { MCSymbol *StartLabel = getLabelBeforeInsn(Ranges.begin()->first); - DenseMap >::iterator I = - InlineInfo.find(InlinedSP); + InlineInfoMap::iterator I = InlineInfo.find(InlinedSP); if (I == InlineInfo.end()) { InlineInfo[InlinedSP].push_back(std::make_pair(StartLabel, ScopeDIE)); @@ -1727,7 +1726,7 @@ void DwarfDebug::endFunction(const MachineFunction *MF) { TheCU->addFlag(CurFnDIE, dwarf::DW_AT_APPLE_omit_frame_ptr); // Clear debug info - for (DenseMap >::iterator + for (ScopeVariablesMap::iterator I = ScopeVariables.begin(), E = ScopeVariables.end(); I != E; ++I) DeleteContainerPointers(I->second); ScopeVariables.clear(); @@ -2586,8 +2585,7 @@ void DwarfDebug::emitDebugInlineInfo() { E = InlinedSPNodes.end(); I != E; ++I) { const MDNode *Node = *I; - DenseMap >::iterator II - = InlineInfo.find(Node); + InlineInfoMap::iterator II = InlineInfo.find(Node); SmallVectorImpl &Labels = II->second; DISubprogram SP(Node); StringRef LName = SP.getLinkageName(); diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h index 26e90fb695c..b5f66868b4a 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h @@ -327,7 +327,9 @@ class DwarfDebug { DenseMap AbstractSPDies; // Collection of dbg variables of a scope. - DenseMap > ScopeVariables; + typedef DenseMap > ScopeVariablesMap; + ScopeVariablesMap ScopeVariables; // Collection of abstract variables. DenseMap AbstractVariables; @@ -342,7 +344,9 @@ class DwarfDebug { // Keep track of inlined functions and their location. This // information is used to populate the debug_inlined section. typedef std::pair InlineInfoLabels; - DenseMap > InlineInfo; + typedef DenseMap > InlineInfoMap; + InlineInfoMap InlineInfo; SmallVector InlinedSPNodes; // This is a collection of subprogram MDNodes that are processed to -- cgit v1.2.3