[llvm] 7786ac0 - MCContext::reset: clear RelSecnames & MacroMap
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 1 21:37:00 PDT 2025
Author: Fangrui Song
Date: 2025-06-01T21:36:55-07:00
New Revision: 7786ac077acc4e81f987dd1db9cbd109f95ab37a
URL: https://github.com/llvm/llvm-project/commit/7786ac077acc4e81f987dd1db9cbd109f95ab37a
DIFF: https://github.com/llvm/llvm-project/commit/7786ac077acc4e81f987dd1db9cbd109f95ab37a.diff
LOG: MCContext::reset: clear RelSecnames & MacroMap
When MCContext is used for the second compile of
llvm/test/MC/ELF/twice.ll, ensure that .rel.text and .rel.eh_frame
strings do not come from the previous compilation copies.
Added:
Modified:
llvm/lib/MC/MCContext.cpp
Removed:
################################################################################
diff --git a/llvm/lib/MC/MCContext.cpp b/llvm/lib/MC/MCContext.cpp
index e0e5e7bfc37d7..37bae640352e6 100644
--- a/llvm/lib/MC/MCContext.cpp
+++ b/llvm/lib/MC/MCContext.cpp
@@ -177,6 +177,8 @@ void MCContext::reset() {
XCOFFUniquingMap.clear();
DXCUniquingMap.clear();
+ RelSecNames.clear();
+ MacroMap.clear();
ELFEntrySizeMap.clear();
ELFSeenGenericMergeableSections.clear();
More information about the llvm-commits
mailing list