From: Eric Christopher Date: Thu, 6 Mar 2014 19:51:16 +0000 (+0000) Subject: Constify a few things with DotDebugLocEntry. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=27cfb7a41d02e2f36f9dbcd467b557116c86c3f0;p=oota-llvm.git Constify a few things with DotDebugLocEntry. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203150 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 1a906e10331..d30be282361 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -2526,11 +2526,11 @@ void DwarfDebug::emitDebugLoc() { unsigned char Size = Asm->getDataLayout().getPointerSize(); Asm->OutStreamer.EmitLabel(Asm->GetTempSymbol("debug_loc", 0)); unsigned index = 1; - for (SmallVectorImpl::iterator + for (SmallVectorImpl::const_iterator I = DotDebugLocEntries.begin(), E = DotDebugLocEntries.end(); I != E; ++I, ++index) { - DotDebugLocEntry &Entry = *I; + const DotDebugLocEntry &Entry = *I; if (Entry.isMerged()) continue; if (Entry.isEmpty()) { diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.h b/lib/CodeGen/AsmPrinter/DwarfDebug.h index 635b5dd1454..dc1607ab7ed 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.h +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.h @@ -124,8 +124,8 @@ public: /// \brief Empty entries are also used as a trigger to emit temp label. Such /// labels are referenced is used to find debug_loc offset for a given DIE. - bool isEmpty() { return Begin == 0 && End == 0; } - bool isMerged() { return Merged; } + bool isEmpty() const { return Begin == 0 && End == 0; } + bool isMerged() const { return Merged; } void Merge(DotDebugLocEntry *Next) { if (!(Begin && Loc == Next->Loc && End == Next->Begin)) return;