Skip to content

Commit d125e71

Browse files
committed
[MC] Remove setAllowTemporaryLabels and rename AllowTemporaryLabels
Follow-up to a91c839.
1 parent a91c839 commit d125e71

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

llvm/include/llvm/MC/MCContext.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ class MCContext {
243243
/// Honor temporary labels, this is useful for debugging semantic
244244
/// differences between temporary and non-temporary labels (primarily on
245245
/// Darwin).
246-
bool AllowTemporaryLabels = true;
246+
bool SaveTempLabels = false;
247247
bool UseNamesOnTempLabels = false;
248248

249249
/// The Compile Unit ID that we are currently processing.
@@ -421,7 +421,6 @@ class MCContext {
421421

422422
CodeViewContext &getCVContext();
423423

424-
void setAllowTemporaryLabels(bool Value) { AllowTemporaryLabels = Value; }
425424
void setUseNamesOnTempLabels(bool Value) { UseNamesOnTempLabels = Value; }
426425

427426
/// \name Module Lifetime Management

llvm/lib/MC/MCContext.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ MCContext::MCContext(const Triple &TheTriple, const MCAsmInfo *mai,
7474
InlineAsmUsedLabelNames(Allocator),
7575
CurrentDwarfLoc(0, 0, 0, DWARF2_FLAG_IS_STMT, 0, 0),
7676
AutoReset(DoAutoReset), TargetOptions(TargetOpts) {
77-
AllowTemporaryLabels = !(TargetOptions && TargetOptions->MCSaveTempLabels);
77+
SaveTempLabels = TargetOptions && TargetOptions->MCSaveTempLabels;
7878
SecureLogFile = TargetOptions ? TargetOptions->AsSecureLogFile : "";
7979

8080
if (SrcMgr && SrcMgr->getNumBuffers())
@@ -268,7 +268,7 @@ MCSymbol *MCContext::createSymbol(StringRef Name, bool AlwaysAddSuffix,
268268
bool IsTemporary) {
269269
// Determine whether this is a user written assembler temporary or normal
270270
// label, if used.
271-
if (AllowTemporaryLabels && !IsTemporary)
271+
if (!SaveTempLabels && !IsTemporary)
272272
IsTemporary = Name.starts_with(MAI->getPrivateGlobalPrefix());
273273

274274
SmallString<128> NewName = Name;

0 commit comments

Comments
 (0)