[PATCH] D35643: [DWARF] Added check that verifies that no abbreviation declaration has more than one attribute with the same name.

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 19 17:25:32 PDT 2017


aprantl added inline comments.


================
Comment at: lib/DebugInfo/DWARF/DWARFContext.cpp:417
   DWARFVerifier verifier(OS, *this);
+  if (!verifier.handleDebugAbbrev()) {
+    Success = false;
----------------
Shorter alterntive:
`Success &= verifier.handleDebugAbbrev();`


================
Comment at: lib/DebugInfo/DWARF/DWARFVerifier.cpp:119
+    for (auto DeclIter = AbbrDecls->begin(); DeclIter != AbbrDecls->end();
+         DeclIter++) {
+      SmallDenseSet<uint16_t> AttributeSet;
----------------
does a range-based for work here?
for (auto AbbrDecl : AbbrDecls) ...


https://reviews.llvm.org/D35643





More information about the llvm-commits mailing list