diff options
| author | Raphael Isemann <teemperor@gmail.com> | 2019-12-17 14:34:17 +0100 |
|---|---|---|
| committer | Raphael Isemann <teemperor@gmail.com> | 2019-12-17 15:56:07 +0100 |
| commit | b852b3c982d2e8ad3f13c626b3e3655e5b3c399e (patch) | |
| tree | a250e43225e15ce6f11b9d9f01d869bf92140c36 /lldb/source | |
| parent | 4becf68c6f17fe143539ceac954b21175914e1c1 (diff) | |
| download | bcm5719-llvm-b852b3c982d2e8ad3f13c626b3e3655e5b3c399e.tar.gz bcm5719-llvm-b852b3c982d2e8ad3f13c626b3e3655e5b3c399e.zip | |
[lldb][NFC] Rename ClangASTImporter::InsertRecordDecl to SetRecordLayout and document it
This function is just setting the layout for the given RecordDecl so
the current name is not very descriptive. Also add some documentation for it.
Diffstat (limited to 'lldb/source')
4 files changed, 5 insertions, 5 deletions
diff --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp index d7b216c99fe..136027ee4d5 100644 --- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp +++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp @@ -1720,7 +1720,7 @@ DWARFASTParserClang::ParseStructureLikeDIE(const SymbolContext &sc, ClangASTContext::GetAsRecordDecl(clang_type); if (record_decl) { - GetClangASTImporter().InsertRecordDecl( + GetClangASTImporter().SetRecordLayout( record_decl, ClangASTImporter::LayoutInfo()); } } @@ -2134,7 +2134,7 @@ bool DWARFASTParserClang::CompleteRecordType(const DWARFDIE &die, clang::CXXRecordDecl *record_decl = m_ast.GetAsCXXRecordDecl(clang_type.GetOpaqueQualType()); if (record_decl) - GetClangASTImporter().InsertRecordDecl(record_decl, layout_info); + GetClangASTImporter().SetRecordLayout(record_decl, layout_info); } return (bool)clang_type; diff --git a/lldb/source/Plugins/SymbolFile/NativePDB/UdtRecordCompleter.cpp b/lldb/source/Plugins/SymbolFile/NativePDB/UdtRecordCompleter.cpp index 3c494dc8398..7221144407c 100644 --- a/lldb/source/Plugins/SymbolFile/NativePDB/UdtRecordCompleter.cpp +++ b/lldb/source/Plugins/SymbolFile/NativePDB/UdtRecordCompleter.cpp @@ -231,6 +231,6 @@ void UdtRecordCompleter::complete() { ClangASTContext::CompleteTagDeclarationDefinition(m_derived_ct); if (auto *record_decl = llvm::dyn_cast<clang::CXXRecordDecl>(&m_tag_decl)) { - m_ast_builder.importer().InsertRecordDecl(record_decl, m_layout); + m_ast_builder.importer().SetRecordLayout(record_decl, m_layout); } } diff --git a/lldb/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp b/lldb/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp index 245d99c8c05..7bf94c64aa4 100644 --- a/lldb/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp +++ b/lldb/source/Plugins/SymbolFile/PDB/PDBASTParser.cpp @@ -1207,7 +1207,7 @@ bool PDBASTParser::CompleteTypeFromUDT( if (!record_decl) return static_cast<bool>(compiler_type); - GetClangASTImporter().InsertRecordDecl(record_decl, layout_info); + GetClangASTImporter().SetRecordLayout(record_decl, layout_info); return static_cast<bool>(compiler_type); } diff --git a/lldb/source/Symbol/ClangASTImporter.cpp b/lldb/source/Symbol/ClangASTImporter.cpp index 3c11c3250af..de5448d4317 100644 --- a/lldb/source/Symbol/ClangASTImporter.cpp +++ b/lldb/source/Symbol/ClangASTImporter.cpp @@ -547,7 +547,7 @@ bool ClangASTImporter::LayoutRecordType( return success; } -void ClangASTImporter::InsertRecordDecl(clang::RecordDecl *decl, +void ClangASTImporter::SetRecordLayout(clang::RecordDecl *decl, const LayoutInfo &layout) { m_record_decl_to_layout_map.insert(std::make_pair(decl, layout)); } |

