summaryrefslogtreecommitdiffstats
path: root/lldb/source/Symbol/ClangASTContext.cpp
diff options
context:
space:
mode:
authorRaphael Isemann <teemperor@gmail.com>2020-01-14 13:06:31 +0100
committerRaphael Isemann <teemperor@gmail.com>2020-01-14 14:26:29 +0100
commit3f944a8b8ca895667f04748f62d350f07ee1416b (patch)
treede882ee641aa8717225c90717f8def9b92fa29fc /lldb/source/Symbol/ClangASTContext.cpp
parent6aca3e8dfa228fb75e410e34db74982a0ab3939f (diff)
downloadbcm5719-llvm-3f944a8b8ca895667f04748f62d350f07ee1416b.tar.gz
bcm5719-llvm-3f944a8b8ca895667f04748f62d350f07ee1416b.zip
[lldb][NFC] Make name parameter in AddMethodToCXXRecordType a StringRef
Diffstat (limited to 'lldb/source/Symbol/ClangASTContext.cpp')
-rw-r--r--lldb/source/Symbol/ClangASTContext.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/lldb/source/Symbol/ClangASTContext.cpp b/lldb/source/Symbol/ClangASTContext.cpp
index 78310adbdab..ac3bce179d9 100644
--- a/lldb/source/Symbol/ClangASTContext.cpp
+++ b/lldb/source/Symbol/ClangASTContext.cpp
@@ -7116,12 +7116,11 @@ clang::VarDecl *ClangASTContext::AddVariableToRecordType(
}
clang::CXXMethodDecl *ClangASTContext::AddMethodToCXXRecordType(
- lldb::opaque_compiler_type_t type, const char *name, const char *mangled_name,
- const CompilerType &method_clang_type, lldb::AccessType access,
- bool is_virtual, bool is_static, bool is_inline, bool is_explicit,
- bool is_attr_used, bool is_artificial) {
- if (!type || !method_clang_type.IsValid() || name == nullptr ||
- name[0] == '\0')
+ lldb::opaque_compiler_type_t type, llvm::StringRef name,
+ const char *mangled_name, const CompilerType &method_clang_type,
+ lldb::AccessType access, bool is_virtual, bool is_static, bool is_inline,
+ bool is_explicit, bool is_attr_used, bool is_artificial) {
+ if (!type || !method_clang_type.IsValid() || name.empty())
return nullptr;
clang::QualType record_qual_type(GetCanonicalQualType(type));
@@ -7162,7 +7161,7 @@ clang::CXXMethodDecl *ClangASTContext::AddMethodToCXXRecordType(
nullptr /*expr*/, is_explicit
? clang::ExplicitSpecKind::ResolvedTrue
: clang::ExplicitSpecKind::ResolvedFalse);
- if (name[0] == '~') {
+ if (name.startswith("~")) {
cxx_dtor_decl = clang::CXXDestructorDecl::Create(
getASTContext(), cxx_record_decl, clang::SourceLocation(),
clang::DeclarationNameInfo(
OpenPOWER on IntegriCloud