[llvm] [BOLT][DWARF][NFC] Split DIEBuilder::finish (PR #101244)
Alexander Yermolovich via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 30 17:26:10 PDT 2024
================
@@ -761,10 +761,18 @@ void DWARFRewriter::updateDebugInfo() {
: std::optional<std::string>(opts::DwarfOutputPath.c_str());
std::string DWOName = DIEBlder.updateDWONameCompDir(
*StrOffstsWriter, *StrWriter, *CU, DwarfOutputPath, std::nullopt);
+ auto DWODIEBuilderPtr = std::make_unique<DIEBuilder>(
+ BC, &(**SplitCU).getContext(), DebugNamesTable, CU);
+ DWODIEBuildersByCU.emplace_back(std::move(DWODIEBuilderPtr));
+ DIEBuilder &DWODIEBuilder = *DWODIEBuildersByCU.back().get();
----------------
ayermolo wrote:
This could be just one line:
DIEBuilder &DWODIEBuilder = *DWODIEBuildersByCU.emplace_back(std::move(DWODIEBuilderPtr)).get();
https://github.com/llvm/llvm-project/pull/101244
More information about the llvm-commits
mailing list