dblaikie added inline comments.

================
Comment at: lldb/source/Symbol/TypeSystem.cpp:331
           "TypeSystem for language " +
-              llvm::toStringRef(Language::GetNameForLanguageType(language)) +
+              llvm::StringRef(Language::GetNameForLanguageType(language)) +
               " doesn't exist",
----------------
Perhaps Language::GetNameForLanguageType should return StringRef to start with?

(& guessing there should be an lldb test case demonstrating this fix?)


================
Comment at: llvm/include/llvm/ADT/StringExtras.h:52-53
 /// Construct a string ref from a boolean.
-inline StringRef toStringRef(bool B) { return StringRef(B ? "true" : "false"); 
}
+template <typename T>
+typename std::enable_if<std::is_same<T, bool>::value, StringRef>::type
+toStringRef(T B) {
----------------
labath wrote:
> This enable_if trick might be worth a short comment...
Sure, something like "ensure only bools are accepted here to avoid surprising 
implicit conversion to bool (for ints, pointers, etc)" if you like.


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

https://reviews.llvm.org/D65942



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to