[PATCH] D35265: [libunwind] Handle .ARM.exidx tables without sentinel last entry

Momchil Velikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 19 08:42:48 PDT 2017


chill marked 5 inline comments as done.
chill added inline comments.


================
Comment at: src/UnwindCursor.hpp:699
   }
+  static _Self last(A& addressSpace, const UnwindInfoSections& sects) {
+    assert(sects.arm_section_length > 0);
----------------
compnerd wrote:
> Isn't this equivalent to `--end()`?
Indeed, it is. Fixed.


================
Comment at: src/UnwindCursor.hpp:767
+  } else {
+    EHABISectionIterator<A> itThisPC = itNextPC - 1;
+    thisPC = itThisPC.functionAddress();
----------------
peter.smith wrote:
> This is by far the most common case, is it worth rewriting if (itNextPC ==end) as if (itNextPC != end) and making this appear first. 
The iterator class does not implement operator!=, I think it's not worth it just because of a stylistic change.


https://reviews.llvm.org/D35265





More information about the llvm-commits mailing list