[llvm] [BOLT][DWARF][NFC] Move common access outside of parallel function (PR #99728)
Kevin Frei via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 23 14:23:40 PDT 2024
================
@@ -759,8 +751,14 @@ void DWARFRewriter::updateDebugInfo() {
DebugRangesSectionWriter *TempRangesSectionWriter =
CU->getVersion() >= 5 ? RangeListsWritersByCU[*DWOId].get()
: LegacyRangesWritersByCU[*DWOId].get();
+ std::optional<std::string> DwarfOutputPath =
+ opts::DwarfOutputPath.empty()
+ ? std::nullopt
+ : std::optional<std::string>(opts::DwarfOutputPath.c_str());
+ std::string DWOName = DIEBlder.updateDWONameCompDir(
----------------
kevinfrei wrote:
Why does hoisting this out of the lambda mean you don't need the lock anymore?
https://github.com/llvm/llvm-project/pull/99728
More information about the llvm-commits
mailing list