[llvm] [BOLT][DWARF][NFC] Move common access outside of parallel function (PR #99728)

Alexander Yermolovich via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 23 14:11:48 PDT 2024


================
@@ -759,8 +751,16 @@ void DWARFRewriter::updateDebugInfo() {
       DebugRangesSectionWriter *TempRangesSectionWriter =
           CU->getVersion() >= 5 ? RangeListsWritersByCU[*DWOId].get()
                                 : LegacyRangesWritersByCU[*DWOId].get();
+      std::string DWOName = "";
+      std::optional<std::string> DwarfOutputPath =
+          opts::DwarfOutputPath.empty()
+              ? std::nullopt
+              : std::optional<std::string>(opts::DwarfOutputPath.c_str());
+      std::lock_guard<std::mutex> Lock(AccessMutex);
----------------
ayermolo wrote:

Just remove this in this diff. It no longer makes sense in this context.

https://github.com/llvm/llvm-project/pull/99728


More information about the llvm-commits mailing list