[PATCH] D48370: [XRay][llvm] Load XRay Profiles

Dean Michael Berris via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 3 00:17:21 PDT 2018


dberris added a comment.

Thanks!



================
Comment at: llvm/lib/XRay/Profile.cpp:187-188
+    for (const auto &PathAndData : Block.PathData) {
+      auto &PathID = PathAndData.first;
+      auto &Data = PathAndData.second;
+      auto NewPathID = Merged.internPath(cantFail(L.expandPath(PathID)));
----------------
kpw wrote:
> dberris wrote:
> > kpw wrote:
> > > There is a bit of the cascading auto here where the compiler is fine, but a reader might get a bit lost.
> > > 
> > > It is not too verbose and might help to make these:
> > > Profile::PathID &PathID and
> > > Profile::Data &Data.
> > It actually turns out to be more cumbersome, because of the repetition of the type and the identifier being spelled the same:
> > 
> > ```
> > const Profile::PathID &PathID = ...;
> > const Profile::Data &Data = ...;
> > ```
> In the words of the dude: "That's just like... your opinion man."
Duuuuude... :)


https://reviews.llvm.org/D48370





More information about the llvm-commits mailing list