[PATCH] Make getUnitForOffset a DWARFUnit method instead of a DWARFContext method.

David Blaikie dblaikie at gmail.com
Fri Sep 12 09:16:38 PDT 2014


Looks good to me once the two minor comments are addressed.

Thanks for your patience!

================
Comment at: lib/DebugInfo/DWARFUnit.h:65
@@ +64,3 @@
+
+  UnitType *getUnitForOffset(uint32_t Offset) const {
+    auto *CU = std::lower_bound(this->begin(), this->end(), Offset,
----------------
Missing override

================
Comment at: lib/DebugInfo/DWARFUnit.h:66
@@ +65,3 @@
+  UnitType *getUnitForOffset(uint32_t Offset) const {
+    auto *CU = std::lower_bound(this->begin(), this->end(), Offset,
+                                UnitOffsetComparator());
----------------
drop the '*' - SmallVector's iterators shouldn't be assumed to be pointers (we could one day have a checked iterator implementation with assertions, etc)

http://reviews.llvm.org/D5310






More information about the llvm-commits mailing list