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

Saleem Abdulrasool via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 18 21:50:41 PDT 2017


compnerd added inline comments.


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


================
Comment at: src/UnwindCursor.hpp:754
   EHABISectionIterator<A> itNextPC = std::upper_bound(begin, end, pc);
-  if (itNextPC == begin || itNextPC == end)
+  if (itNextPC == begin || begin == end)
     return false;
----------------
Can't the second clause be lifted above the `upper_bound`?


https://reviews.llvm.org/D35265





More information about the llvm-commits mailing list