@@ -748,8 +748,7 @@ bool Module::LookupInfo::NameMatchesLookupInfo(
748
748
// relatively inexpensive since no demangling is actually occuring. See
749
749
// Mangled::SetValue for more context.
750
750
const bool function_name_may_be_mangled =
751
- Mangled::GetManglingScheme (function_name.GetStringRef ()) !=
752
- Mangled::eManglingSchemeNone;
751
+ Mangled::GetManglingScheme (function_name) != Mangled::eManglingSchemeNone;
753
752
ConstString demangled_function_name = function_name;
754
753
if (function_name_may_be_mangled) {
755
754
Mangled mangled_function_name (function_name);
@@ -760,11 +759,10 @@ bool Module::LookupInfo::NameMatchesLookupInfo(
760
759
// Otherwise just check that the demangled function name contains the
761
760
// demangled user-provided name.
762
761
if (Language *language = Language::FindPlugin (language_type))
763
- return language->DemangledNameContainsPath (m_name.GetStringRef (),
764
- demangled_function_name);
762
+ return language->DemangledNameContainsPath (m_name, demangled_function_name);
765
763
766
- llvm::StringRef function_name_ref = demangled_function_name. GetStringRef () ;
767
- return function_name_ref.contains (m_name. GetStringRef () );
764
+ llvm::StringRef function_name_ref = demangled_function_name;
765
+ return function_name_ref.contains (m_name);
768
766
}
769
767
770
768
void Module::LookupInfo::Prune (SymbolContextList &sc_list,
@@ -803,7 +801,7 @@ void Module::LookupInfo::Prune(SymbolContextList &sc_list,
803
801
CPlusPlusLanguage::MethodName cpp_method (full_name);
804
802
if (cpp_method.IsValid ()) {
805
803
if (cpp_method.GetContext ().empty ()) {
806
- if (cpp_method.GetBasename ().compare (m_name. GetStringRef () ) != 0 ) {
804
+ if (cpp_method.GetBasename ().compare (m_name) != 0 ) {
807
805
sc_list.RemoveContextAtIndex (i);
808
806
continue ;
809
807
}
@@ -1026,8 +1024,8 @@ void Module::FindTypes(
1026
1024
FindTypes_Impl (name, CompilerDeclContext (), UINT_MAX,
1027
1025
searched_symbol_files, typesmap);
1028
1026
if (exact_match) {
1029
- typesmap.RemoveMismatchedTypes (type_scope, name. GetStringRef () ,
1030
- type_class, exact_match);
1027
+ typesmap.RemoveMismatchedTypes (type_scope, name, type_class ,
1028
+ exact_match);
1031
1029
}
1032
1030
}
1033
1031
}
@@ -1132,7 +1130,7 @@ void Module::ReportWarningOptimization(
1132
1130
return ;
1133
1131
1134
1132
StreamString ss;
1135
- ss << file_name. GetStringRef ()
1133
+ ss << file_name
1136
1134
<< " was compiled with optimization - stepping may behave "
1137
1135
" oddly; variables may not be available." ;
1138
1136
Debugger::ReportWarning (std::string (ss.GetString ()), debugger_id,
@@ -1668,7 +1666,7 @@ uint32_t Module::Hash() {
1668
1666
llvm::raw_string_ostream id_strm (identifier);
1669
1667
id_strm << m_arch.GetTriple ().str () << ' -' << m_file.GetPath ();
1670
1668
if (m_object_name)
1671
- id_strm << ' (' << m_object_name. GetStringRef () << ' )' ;
1669
+ id_strm << ' (' << m_object_name << ' )' ;
1672
1670
if (m_object_offset > 0 )
1673
1671
id_strm << m_object_offset;
1674
1672
const auto mtime = llvm::sys::toTimeT (m_object_mod_time);
@@ -1682,7 +1680,7 @@ std::string Module::GetCacheKey() {
1682
1680
llvm::raw_string_ostream strm (key);
1683
1681
strm << m_arch.GetTriple ().str () << ' -' << m_file.GetFilename ();
1684
1682
if (m_object_name)
1685
- strm << ' (' << m_object_name. GetStringRef () << ' )' ;
1683
+ strm << ' (' << m_object_name << ' )' ;
1686
1684
strm << ' -' << llvm::format_hex (Hash (), 10 );
1687
1685
return strm.str ();
1688
1686
}
0 commit comments