[llvm] 7c9c498 - [DWARFLinkerParallel] Fix member initialization order (#81179)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 8 13:43:15 PST 2024
Author: Fangrui Song
Date: 2024-02-08T13:43:11-08:00
New Revision: 7c9c4983b1d493c2fdea76f99591f9ab49877306
URL: https://github.com/llvm/llvm-project/commit/7c9c4983b1d493c2fdea76f99591f9ab49877306
DIFF: https://github.com/llvm/llvm-project/commit/7c9c4983b1d493c2fdea76f99591f9ab49877306.diff
LOG: [DWARFLinkerParallel] Fix member initialization order (#81179)
DWARFLinkerImpl::DWARFLinkerImpl initializes
DebugStrStrings/DebugLineStrStrings/CommonSections using GlobalData
but GlobalData is initialized after the three members.
Move GlobalData before.
Fix #81110
Added:
Modified:
llvm/lib/DWARFLinker/Parallel/DWARFLinkerImpl.h
Removed:
################################################################################
diff --git a/llvm/lib/DWARFLinker/Parallel/DWARFLinkerImpl.h b/llvm/lib/DWARFLinker/Parallel/DWARFLinkerImpl.h
index 527c7a0ec3642f..7c17c5b79c7c18 100644
--- a/llvm/lib/DWARFLinker/Parallel/DWARFLinkerImpl.h
+++ b/llvm/lib/DWARFLinker/Parallel/DWARFLinkerImpl.h
@@ -351,6 +351,9 @@ class DWARFLinkerImpl : public DWARFLinker {
/// \defgroup Data members accessed sequentially.
///
/// @{
+ /// Data global for the whole linking process.
+ LinkingGlobalData GlobalData;
+
/// DwarfStringPoolEntries for .debug_str section.
StringEntryToDwarfStringPoolEntryMap DebugStrStrings;
@@ -368,9 +371,6 @@ class DWARFLinkerImpl : public DWARFLinker {
/// Overall compile units number.
uint64_t OverallNumberOfCU = 0;
-
- /// Data global for the whole linking process.
- LinkingGlobalData GlobalData;
/// @}
};
More information about the llvm-commits
mailing list