[PATCH] D29319: [XRay] Define the InstrumentationMap type
David Blaikie via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 31 09:40:27 PST 2017
dblaikie accepted this revision.
dblaikie added inline comments.
This revision is now accepted and ready to land.
================
Comment at: include/llvm/XRay/InstrumentationMap.h:98-99
+ /// Provide read-only access to the entries of the instrumentation map.
+ iterator_range<SledContainer::const_iterator> sleds() const {
+ return make_range(Sleds.begin(), Sleds.end());
+ };
----------------
You can skip teh iterator_range and return a reference to the container here, I think?
================
Comment at: lib/XRay/InstrumentationMap.cpp:44
+// ECError instances contain.
+Expected<InstrumentationMap> loadInstrumentationMap(StringRef Filename) {
+ // At this point we assume the file is an object file -- and if that doesn't
----------------
Probably simplify/refactor this function so it's short and calls two other functions that do the bulk of the work in the two sides of the if/else. Imagine that'd make it a bit easier to read.
https://reviews.llvm.org/D29319
More information about the llvm-commits
mailing list