Skip to content

Commit 7786ac0

Browse files
committed
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.
1 parent 2a67307 commit 7786ac0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

llvm/lib/MC/MCContext.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,8 @@ void MCContext::reset() {
177177
XCOFFUniquingMap.clear();
178178
DXCUniquingMap.clear();
179179

180+
RelSecNames.clear();
181+
MacroMap.clear();
180182
ELFEntrySizeMap.clear();
181183
ELFSeenGenericMergeableSections.clear();
182184

0 commit comments

Comments
 (0)