From 9dfd4e260bd4f9f1d9d0fce343ed645fdd331261 Mon Sep 17 00:00:00 2001 From: Raphael Isemann Date: Tue, 11 Feb 2020 13:31:00 +0100 Subject: [lldb][NFC] Remove ConstString -> const char * -> StringRef conversions when calling Stream::Indent Let's just pass in a StringRef and save the strlen call when rebuilding the StringRef parameter. --- .../RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp') diff --git a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp index 78fec8e5c20a..9b81ba03148c 100644 --- a/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp +++ b/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp @@ -3131,7 +3131,7 @@ void RenderScriptRuntime::DumpKernels(Stream &strm) const { strm.Printf("Resource '%s':", module->m_resname.c_str()); strm.EOL(); for (const auto &kernel : module->m_kernels) { - strm.Indent(kernel.m_name.AsCString()); + strm.Indent(kernel.m_name.GetStringRef()); strm.EOL(); } } @@ -3941,7 +3941,7 @@ void RSModuleDescriptor::Dump(Stream &strm) const { } void RSGlobalDescriptor::Dump(Stream &strm) const { - strm.Indent(m_name.AsCString()); + strm.Indent(m_name.GetStringRef()); VariableList var_list; m_module->m_module->FindGlobalVariables(m_name, nullptr, 1U, var_list); if (var_list.GetSize() == 1) { @@ -3966,12 +3966,12 @@ void RSGlobalDescriptor::Dump(Stream &strm) const { } void RSKernelDescriptor::Dump(Stream &strm) const { - strm.Indent(m_name.AsCString()); + strm.Indent(m_name.GetStringRef()); strm.EOL(); } void RSReductionDescriptor::Dump(lldb_private::Stream &stream) const { - stream.Indent(m_reduce_name.AsCString()); + stream.Indent(m_reduce_name.GetStringRef()); stream.IndentMore(); stream.EOL(); stream.Indent(); -- cgit v1.2.3