[PATCH] D31385: [XRay] Update FDR log reader to be aware of buffer sizes per thread.

Dean Michael Berris via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 28 17:33:40 PDT 2017


dberris added inline comments.


================
Comment at: lib/XRay/Trace.cpp:423-426
+            .concat(fdrStateToTwine(State.Expects))
+            .concat(Twine(". Remaining expected bytes in thread buffer total "))
+            .concat(
+                Twine(State.CurrentBufferSize - State.CurrentBufferConsumed)),
----------------
kpw wrote:
> dberris wrote:
> > I suspect it's more readable if you just used '+' here. Idiomatic Twine usage seems to prefer concatenation with '+' for readability reasons.
> Will a conversion operator be called for literal strings past the first.
> 
> Is it idiomatic to write Twine("Concatenating ") + "several" + " strings " + " that " + " become twines " and get a Twine as the result?
Yes, that's idiomatic. :)


https://reviews.llvm.org/D31385





More information about the llvm-commits mailing list