diff options
author | Fangrui Song <i@maskray.me> | 2024-06-12 16:42:58 -0700 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2024-06-12 16:42:58 -0700 |
commit | ca91538c9c6f5328f398ac849dcc4230824b007e (patch) | |
tree | b7c1dac8c190c6f5b654ebcd7c4d7f44763d840e /llvm/lib/MC | |
parent | e80c59556d2d71cc2d0dcb2bd712c36cc4043025 (diff) | |
download | llvm-ca91538c9c6f5328f398ac849dcc4230824b007e.zip llvm-ca91538c9c6f5328f398ac849dcc4230824b007e.tar.gz llvm-ca91538c9c6f5328f398ac849dcc4230824b007e.tar.bz2 |
[MC] Move AllowTemporaryLabels setting to MCContext::MCContext
Also delete `AllowTemporaryLabels = true` from MCContext::reset: when
llc supports -save-temp-labels in the next change, this assignment
should be removed to support -compile-twice.
Diffstat (limited to 'llvm/lib/MC')
-rw-r--r-- | llvm/lib/MC/MCContext.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/MC/MCContext.cpp b/llvm/lib/MC/MCContext.cpp index 1590054..fa1b095 100644 --- a/llvm/lib/MC/MCContext.cpp +++ b/llvm/lib/MC/MCContext.cpp @@ -74,6 +74,7 @@ MCContext::MCContext(const Triple &TheTriple, const MCAsmInfo *mai, InlineAsmUsedLabelNames(Allocator), CurrentDwarfLoc(0, 0, 0, DWARF2_FLAG_IS_STMT, 0, 0), AutoReset(DoAutoReset), TargetOptions(TargetOpts) { + AllowTemporaryLabels = !(TargetOptions && TargetOptions->MCSaveTempLabels); SecureLogFile = TargetOptions ? TargetOptions->AsSecureLogFile : ""; if (SrcMgr && SrcMgr->getNumBuffers()) @@ -179,7 +180,6 @@ void MCContext::reset() { ELFSeenGenericMergeableSections.clear(); NextID.clear(); - AllowTemporaryLabels = true; DwarfLocSeen = false; GenDwarfForAssembly = false; GenDwarfFileNumber = 0; |