[PATCH] D58675: [clang] Adds `-ftime-trace` option to clang that produces Chrome `chrome://tracing` compatible JSON profiling output dumps

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 13 02:09:12 PDT 2019


lebedev.ri added inline comments.


================
Comment at: llvm/trunk/lib/Support/TimeProfiler.cpp:29-30
+
+static std::string escapeString(StringRef Src) {
+  std::string OS;
+  for (const unsigned char &C : Src) {
----------------
lebedev.ri wrote:
> `SmallString<32>` ?
> Also, it is safe to `OS.reserve(Src.size())`
Also, you probably want to add `raw_svector_ostream` ontop, and `<<` into it.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D58675/new/

https://reviews.llvm.org/D58675





More information about the llvm-commits mailing list