Prompted by @gclayborg in review http://reviews.llvm.org/D15527
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
See inlined comments.
source/Core/StringList.cpp | ||
---|---|---|
365–370 ↗ | (On Diff #43615) | Since this is going out to a Log, we should have all the strings together in one log line. I would suggest making a local StreamString object and using StreamString::Printf() instead of the "log->Debug" calls, and then output the stream all at once: StreamString strm; if (name) strm.Printf("Begin %s:\n", name); for (const auto &s : m_strings) { strm.Indent(); strm.Printf("%s\n", s.c_str()); } if (name) strm.Printf("End %s.\n", name); log->Debug("%s", strm.GetData()); Otherwise we might get the strings out of order and intermixed with other log lines. |