Make DiagnosticsManager functions take StringRefs.

llvm-svn: 286730
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp
index 59dd137..5abad71 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp
+++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp
@@ -325,21 +325,21 @@
                 lldb::eLanguageTypeC)) {
       m_result_delegate.RegisterPersistentState(persistent_state);
     } else {
-      diagnostic_manager.PutCString(
+      diagnostic_manager.PutString(
           eDiagnosticSeverityError,
           "couldn't start parsing (no persistent data)");
       return false;
     }
   } else {
-    diagnostic_manager.PutCString(eDiagnosticSeverityError,
-                                  "error: couldn't start parsing (no target)");
+    diagnostic_manager.PutString(eDiagnosticSeverityError,
+                                 "error: couldn't start parsing (no target)");
     return false;
   }
 
   ScanContext(exe_ctx, err);
 
   if (!err.Success()) {
-    diagnostic_manager.PutCString(eDiagnosticSeverityWarning, err.AsCString());
+    diagnostic_manager.PutString(eDiagnosticSeverityWarning, err.AsCString());
   }
 
   ////////////////////////////////////
@@ -400,8 +400,8 @@
 
     if (!source_code->GetText(m_transformed_text, lang_type, m_in_static_method,
                               exe_ctx)) {
-      diagnostic_manager.PutCString(eDiagnosticSeverityError,
-                                    "couldn't construct expression body");
+      diagnostic_manager.PutString(eDiagnosticSeverityError,
+                                   "couldn't construct expression body");
       return false;
     }
   }
@@ -416,7 +416,7 @@
   Target *target = exe_ctx.GetTargetPtr();
 
   if (!target) {
-    diagnostic_manager.PutCString(eDiagnosticSeverityError, "invalid target");
+    diagnostic_manager.PutString(eDiagnosticSeverityError, "invalid target");
     return false;
   }
 
@@ -443,7 +443,7 @@
   OnExit on_exit([this]() { ResetDeclMap(); });
 
   if (!DeclMap()->WillParse(exe_ctx, m_materializer_ap.get())) {
-    diagnostic_manager.PutCString(
+    diagnostic_manager.PutString(
         eDiagnosticSeverityError,
         "current process state is unsuitable for expression parsing");
 
@@ -508,10 +508,10 @@
     if (!jit_error.Success()) {
       const char *error_cstr = jit_error.AsCString();
       if (error_cstr && error_cstr[0])
-        diagnostic_manager.PutCString(eDiagnosticSeverityError, error_cstr);
+        diagnostic_manager.PutString(eDiagnosticSeverityError, error_cstr);
       else
-        diagnostic_manager.PutCString(eDiagnosticSeverityError,
-                                      "expression can't be interpreted or run");
+        diagnostic_manager.PutString(eDiagnosticSeverityError,
+                                     "expression can't be interpreted or run");
       return false;
     }
   }
@@ -527,8 +527,8 @@
                                   "couldn't run static initializers: %s\n",
                                   error_cstr);
       else
-        diagnostic_manager.PutCString(eDiagnosticSeverityError,
-                                      "couldn't run static initializers\n");
+        diagnostic_manager.PutString(eDiagnosticSeverityError,
+                                     "couldn't run static initializers\n");
       return false;
     }
   }
@@ -597,7 +597,7 @@
     } else if (m_in_objectivec_method) {
       object_name.SetCString("self");
     } else {
-      diagnostic_manager.PutCString(
+      diagnostic_manager.PutString(
           eDiagnosticSeverityError,
           "need object pointer but don't know the language");
       return false;