[PATCH] D30456: [DebugInfo] Unique abbrevs for DIEs with different implicit_const values

Victor Leschuk via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 1 13:24:26 PST 2017


vleschuk marked an inline comment as done.
vleschuk added inline comments.


================
Comment at: unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp:1581-1628
+  // Let's find implicit_const abbrevs and verify,
+  // that there are exactly two of them and both of them
+  // can be dumped correctly.
+  typedef decltype(Abbrevs->begin()) AbbrevIt;
+  AbbrevIt Val1Abbrev = Abbrevs->end();
+  AbbrevIt Val2Abbrev = Abbrevs->end();
+  for(auto it = Abbrevs->begin(); it != Abbrevs->end(); ++it) {
----------------
dblaikie wrote:
> Would it be simpler to visit the DIEs themselves, and verify their attributes represent the correct values?
> 
> (I suppose it'd be nice to verify that the two DIEs using the same implicit_const use the same abbreviation, as well)
Extended test. Left abbrev checking code just to verify that we have exact set of abbrevs that we expect.


https://reviews.llvm.org/D30456





More information about the llvm-commits mailing list