[PATCH] D32177: Using address range map to speedup finding inline stack for address.

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 18 14:07:43 PDT 2017


dblaikie added a comment.

"Also updated the implementation to make sure high addresses are filtered so that the behavior does not change." - might be worth having some test coverage there, if it wasn't already present?



================
Comment at: lib/DebugInfo/DWARF/DWARFUnit.cpp:375
+  auto R = AddrDieMap.upper_bound(Address);
+  if (R == AddrDieMap.begin() || Address >= (--R)->second.first)
+    return DWARFDie();
----------------
I'm guessing this should be "std::prev(R)" not "--R" (so as not to modify "R" so that the later return isn't tainted by this modification) - so that this doesn't make the "return R->second.second" produce the wrong answer?

Is it possible to test this path to make sure the behavior is correct once this is fixed?


https://reviews.llvm.org/D32177





More information about the llvm-commits mailing list