Skip to content

Commit ae8ef6c

Browse files
authored
Merge pull request #243 from Teemperor/swift/master
[upstreaming] Revert changes to ClangASTContext::GetIndexForRecordBase
2 parents acfcc13 + 8b807fb commit ae8ef6c

File tree

2 files changed

+6
-12
lines changed

2 files changed

+6
-12
lines changed

lldb/include/lldb/Symbol/ClangASTContext.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -266,11 +266,6 @@ class ClangASTContext : public TypeSystem {
266266
static uint32_t GetNumBaseClasses(const clang::CXXRecordDecl *cxx_record_decl,
267267
bool omit_empty_base_classes);
268268

269-
static uint32_t
270-
GetIndexForRecordBase(const clang::RecordDecl *record_decl,
271-
const clang::CXXBaseSpecifier *base_spec,
272-
bool omit_empty_base_classes);
273-
274269
CompilerType CreateRecordType(clang::DeclContext *decl_ctx,
275270
lldb::AccessType access_type, const char *name,
276271
int kind, lldb::LanguageType language,

lldb/source/Symbol/ClangASTContext.cpp

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7129,10 +7129,9 @@ CompilerType ClangASTContext::GetChildCompilerTypeAtIndex(
71297129
return CompilerType();
71307130
}
71317131

7132-
uint32_t
7133-
ClangASTContext::GetIndexForRecordBase(const clang::RecordDecl *record_decl,
7134-
const clang::CXXBaseSpecifier *base_spec,
7135-
bool omit_empty_base_classes) {
7132+
static uint32_t GetIndexForRecordBase(const clang::RecordDecl *record_decl,
7133+
const clang::CXXBaseSpecifier *base_spec,
7134+
bool omit_empty_base_classes) {
71367135
uint32_t child_idx = 0;
71377136

71387137
const clang::CXXRecordDecl *cxx_record_decl =
@@ -7274,10 +7273,10 @@ size_t ClangASTContext::GetIndexOfChildMemberWithName(
72747273

72757274
clang::CXXBasePaths paths;
72767275
if (cxx_record_decl->lookupInBases(
7277-
[&decl_name](const CXXBaseSpecifier *base_specifier,
7278-
CXXBasePath &base_path) {
7276+
[decl_name](const clang::CXXBaseSpecifier *specifier,
7277+
clang::CXXBasePath &path) {
72797278
return clang::CXXRecordDecl::FindOrdinaryMember(
7280-
base_specifier, base_path, decl_name);
7279+
specifier, path, decl_name);
72817280
},
72827281
paths)) {
72837282
clang::CXXBasePaths::const_paths_iterator path,

0 commit comments

Comments
 (0)