@@ -771,8 +771,7 @@ bool Module::LookupInfo::NameMatchesLookupInfo(
771
771
// relatively inexpensive since no demangling is actually occuring. See
772
772
// Mangled::SetValue for more context.
773
773
const bool function_name_may_be_mangled =
774
- Mangled::GetManglingScheme (function_name.GetStringRef ()) !=
775
- Mangled::eManglingSchemeNone;
774
+ Mangled::GetManglingScheme (function_name) != Mangled::eManglingSchemeNone;
776
775
ConstString demangled_function_name = function_name;
777
776
if (function_name_may_be_mangled) {
778
777
Mangled mangled_function_name (function_name);
@@ -783,11 +782,10 @@ bool Module::LookupInfo::NameMatchesLookupInfo(
783
782
// Otherwise just check that the demangled function name contains the
784
783
// demangled user-provided name.
785
784
if (Language *language = Language::FindPlugin (language_type))
786
- return language->DemangledNameContainsPath (m_name.GetStringRef (),
787
- demangled_function_name);
785
+ return language->DemangledNameContainsPath (m_name, demangled_function_name);
788
786
789
- llvm::StringRef function_name_ref = demangled_function_name. GetStringRef () ;
790
- return function_name_ref.contains (m_name. GetStringRef () );
787
+ llvm::StringRef function_name_ref = demangled_function_name;
788
+ return function_name_ref.contains (m_name);
791
789
}
792
790
793
791
void Module::LookupInfo::Prune (SymbolContextList &sc_list,
@@ -831,7 +829,7 @@ void Module::LookupInfo::Prune(SymbolContextList &sc_list,
831
829
CPlusPlusLanguage::MethodName cpp_method (full_name);
832
830
if (cpp_method.IsValid ()) {
833
831
if (cpp_method.GetContext ().empty ()) {
834
- if (cpp_method.GetBasename ().compare (m_name. GetStringRef () ) != 0 ) {
832
+ if (cpp_method.GetBasename ().compare (m_name) != 0 ) {
835
833
sc_list.RemoveContextAtIndex (i);
836
834
continue ;
837
835
}
@@ -1054,8 +1052,8 @@ void Module::FindTypes(
1054
1052
FindTypes_Impl (name, CompilerDeclContext (), UINT_MAX,
1055
1053
searched_symbol_files, typesmap);
1056
1054
if (exact_match) {
1057
- typesmap.RemoveMismatchedTypes (type_scope, name. GetStringRef () ,
1058
- type_class, exact_match);
1055
+ typesmap.RemoveMismatchedTypes (type_scope, name, type_class ,
1056
+ exact_match);
1059
1057
}
1060
1058
}
1061
1059
}
@@ -1160,7 +1158,7 @@ void Module::ReportWarningOptimization(
1160
1158
return ;
1161
1159
1162
1160
StreamString ss;
1163
- ss << file_name. GetStringRef ()
1161
+ ss << file_name
1164
1162
<< " was compiled with optimization - stepping may behave "
1165
1163
" oddly; variables may not be available." ;
1166
1164
Debugger::ReportWarning (std::string (ss.GetString ()), debugger_id,
@@ -1872,7 +1870,7 @@ uint32_t Module::Hash() {
1872
1870
llvm::raw_string_ostream id_strm (identifier);
1873
1871
id_strm << m_arch.GetTriple ().str () << ' -' << m_file.GetPath ();
1874
1872
if (m_object_name)
1875
- id_strm << ' (' << m_object_name. GetStringRef () << ' )' ;
1873
+ id_strm << ' (' << m_object_name << ' )' ;
1876
1874
if (m_object_offset > 0 )
1877
1875
id_strm << m_object_offset;
1878
1876
const auto mtime = llvm::sys::toTimeT (m_object_mod_time);
@@ -1886,7 +1884,7 @@ std::string Module::GetCacheKey() {
1886
1884
llvm::raw_string_ostream strm (key);
1887
1885
strm << m_arch.GetTriple ().str () << ' -' << m_file.GetFilename ();
1888
1886
if (m_object_name)
1889
- strm << ' (' << m_object_name. GetStringRef () << ' )' ;
1887
+ strm << ' (' << m_object_name << ' )' ;
1890
1888
strm << ' -' << llvm::format_hex (Hash (), 10 );
1891
1889
return strm.str ();
1892
1890
}
0 commit comments