[PATCH] D22984: [lldb][tsan] Avoid a string copy (NFC)

Saleem Abdulrasool via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 29 18:32:01 PDT 2016


compnerd added a subscriber: compnerd.

================
Comment at: source/Plugins/InstrumentationRuntime/ThreadSanitizer/ThreadSanitizerRuntime.cpp:289
@@ -288,3 +288,3 @@
 static StructuredData::Array *
-ConvertToStructuredArray(ValueObjectSP return_value_sp, std::string items_name, std::string count_name, std::function <void(ValueObjectSP o, StructuredData::Dictionary *dict)> const &callback)
+ConvertToStructuredArray(ValueObjectSP return_value_sp, const std::string &items_name, std::string count_name, std::function <void(ValueObjectSP o, StructuredData::Dictionary *dict)> const &callback)
 {
----------------
Why not make count_name a `const std::string &` as well?


https://reviews.llvm.org/D22984





More information about the llvm-commits mailing list