[llvm] r207151 - [DWARF parser] Simplify and re-format a method
Alexey Samsonov
samsonov at google.com
Thu Apr 24 15:41:09 PDT 2014
Author: samsonov
Date: Thu Apr 24 17:41:09 2014
New Revision: 207151
URL: http://llvm.org/viewvc/llvm-project?rev=207151&view=rev
Log:
[DWARF parser] Simplify and re-format a method
Modified:
llvm/trunk/lib/DebugInfo/DWARFDebugAbbrev.cpp
llvm/trunk/lib/DebugInfo/DWARFDebugAbbrev.h
Modified: llvm/trunk/lib/DebugInfo/DWARFDebugAbbrev.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARFDebugAbbrev.cpp?rev=207151&r1=207150&r2=207151&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/DWARFDebugAbbrev.cpp (original)
+++ llvm/trunk/lib/DebugInfo/DWARFDebugAbbrev.cpp Thu Apr 24 17:41:09 2014
@@ -86,18 +86,18 @@ void DWARFDebugAbbrev::dump(raw_ostream
}
const DWARFAbbreviationDeclarationSet*
-DWARFDebugAbbrev::getAbbreviationDeclarationSet(uint64_t cu_abbr_offset) const {
- DWARFAbbreviationDeclarationCollMapConstIter end = AbbrevCollMap.end();
- DWARFAbbreviationDeclarationCollMapConstIter pos;
- if (PrevAbbrOffsetPos != end &&
- PrevAbbrOffsetPos->first == cu_abbr_offset) {
+DWARFDebugAbbrev::getAbbreviationDeclarationSet(uint64_t CUAbbrOffset) const {
+ DWARFAbbreviationDeclarationCollMapConstIter End = AbbrevCollMap.end();
+ if (PrevAbbrOffsetPos != End && PrevAbbrOffsetPos->first == CUAbbrOffset) {
return &(PrevAbbrOffsetPos->second);
- } else {
- pos = AbbrevCollMap.find(cu_abbr_offset);
- PrevAbbrOffsetPos = pos;
}
- if (pos != AbbrevCollMap.end())
- return &(pos->second);
+ DWARFAbbreviationDeclarationCollMapConstIter Pos =
+ AbbrevCollMap.find(CUAbbrOffset);
+ if (Pos != End) {
+ PrevAbbrOffsetPos = Pos;
+ return &(Pos->second);
+ }
+
return nullptr;
}
Modified: llvm/trunk/lib/DebugInfo/DWARFDebugAbbrev.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/DebugInfo/DWARFDebugAbbrev.h?rev=207151&r1=207150&r2=207151&view=diff
==============================================================================
--- llvm/trunk/lib/DebugInfo/DWARFDebugAbbrev.h (original)
+++ llvm/trunk/lib/DebugInfo/DWARFDebugAbbrev.h Thu Apr 24 17:41:09 2014
@@ -62,8 +62,10 @@ private:
public:
DWARFDebugAbbrev();
+
const DWARFAbbreviationDeclarationSet *
- getAbbreviationDeclarationSet(uint64_t cu_abbr_offset) const;
+ getAbbreviationDeclarationSet(uint64_t CUAbbrOffset) const;
+
void dump(raw_ostream &OS) const;
void parse(DataExtractor data);
};
More information about the llvm-commits
mailing list