diff --git a/lldb/source/Interpreter/OptionValueBoolean.cpp b/lldb/source/Interpreter/OptionValueBoolean.cpp --- a/lldb/source/Interpreter/OptionValueBoolean.cpp +++ b/lldb/source/Interpreter/OptionValueBoolean.cpp @@ -73,10 +73,10 @@ void OptionValueBoolean::AutoComplete(CommandInterpreter &interpreter, CompletionRequest &request) { - static const llvm::StringRef g_autocomplete_entries[] = { - "true", "false", "on", "off", "yes", "no", "1", "0"}; + llvm::StringRef autocomplete_entries[] = {"true", "false", "on", "off", + "yes", "no", "1", "0"}; - auto entries = llvm::makeArrayRef(g_autocomplete_entries); + auto entries = llvm::makeArrayRef(autocomplete_entries); // only suggest "true" or "false" by default if (request.GetCursorArgumentPrefix().empty()) diff --git a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp --- a/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp +++ b/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp @@ -2029,8 +2029,8 @@ if (name_cstr) { llvm::StringRef name_strref(name_cstr); - static const llvm::StringRef ivar_prefix("OBJC_IVAR_$_"); - static const llvm::StringRef class_prefix("OBJC_CLASS_$_"); + llvm::StringRef ivar_prefix("OBJC_IVAR_$_"); + llvm::StringRef class_prefix("OBJC_CLASS_$_"); if (name_strref.startswith(ivar_prefix)) { llvm::StringRef ivar_skipped_prefix = diff --git a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp --- a/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp +++ b/lldb/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp @@ -2059,9 +2059,9 @@ uint32_t i; FileSpecList dylib_files; Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_SYMBOLS)); - static const llvm::StringRef g_objc_v2_prefix_class("_OBJC_CLASS_$_"); - static const llvm::StringRef g_objc_v2_prefix_metaclass("_OBJC_METACLASS_$_"); - static const llvm::StringRef g_objc_v2_prefix_ivar("_OBJC_IVAR_$_"); + llvm::StringRef g_objc_v2_prefix_class("_OBJC_CLASS_$_"); + llvm::StringRef g_objc_v2_prefix_metaclass("_OBJC_METACLASS_$_"); + llvm::StringRef g_objc_v2_prefix_ivar("_OBJC_IVAR_$_"); for (i = 0; i < m_header.ncmds; ++i) { const lldb::offset_t cmd_offset = offset; @@ -3314,13 +3314,13 @@ if (symbol_name) { llvm::StringRef symbol_name_ref(symbol_name); if (symbol_name_ref.startswith("_OBJC_")) { - static const llvm::StringRef + llvm::StringRef g_objc_v2_prefix_class( "_OBJC_CLASS_$_"); - static const llvm::StringRef + llvm::StringRef g_objc_v2_prefix_metaclass( "_OBJC_METACLASS_$_"); - static const llvm::StringRef + llvm::StringRef g_objc_v2_prefix_ivar("_OBJC_IVAR_$_"); if (symbol_name_ref.startswith( g_objc_v2_prefix_class)) { @@ -3370,7 +3370,7 @@ type = eSymbolTypeRuntime; if (symbol_name && symbol_name[0] == '.') { llvm::StringRef symbol_name_ref(symbol_name); - static const llvm::StringRef + llvm::StringRef g_objc_v1_prefix_class(".objc_class_name_"); if (symbol_name_ref.startswith( g_objc_v1_prefix_class)) { @@ -4206,11 +4206,11 @@ if (symbol_name) { llvm::StringRef symbol_name_ref(symbol_name); if (symbol_name_ref.startswith("_OBJC_")) { - static const llvm::StringRef g_objc_v2_prefix_class( + llvm::StringRef g_objc_v2_prefix_class( "_OBJC_CLASS_$_"); - static const llvm::StringRef g_objc_v2_prefix_metaclass( + llvm::StringRef g_objc_v2_prefix_metaclass( "_OBJC_METACLASS_$_"); - static const llvm::StringRef g_objc_v2_prefix_ivar( + llvm::StringRef g_objc_v2_prefix_ivar( "_OBJC_IVAR_$_"); if (symbol_name_ref.startswith(g_objc_v2_prefix_class)) { symbol_name_non_abi_mangled = symbol_name + 1; @@ -4250,7 +4250,7 @@ type = eSymbolTypeRuntime; if (symbol_name && symbol_name[0] == '.') { llvm::StringRef symbol_name_ref(symbol_name); - static const llvm::StringRef g_objc_v1_prefix_class( + llvm::StringRef g_objc_v1_prefix_class( ".objc_class_name_"); if (symbol_name_ref.startswith(g_objc_v1_prefix_class)) { symbol_name_non_abi_mangled = symbol_name;