diff --git a/llvm/include/llvm/MC/MCContext.h b/llvm/include/llvm/MC/MCContext.h index 72eae85467dc9d..ad412409b3e13d 100644 --- a/llvm/include/llvm/MC/MCContext.h +++ b/llvm/include/llvm/MC/MCContext.h @@ -243,7 +243,7 @@ class MCContext { /// Honor temporary labels, this is useful for debugging semantic /// differences between temporary and non-temporary labels (primarily on /// Darwin). - bool AllowTemporaryLabels = true; + bool SaveTempLabels = false; bool UseNamesOnTempLabels = false; /// The Compile Unit ID that we are currently processing. @@ -421,7 +421,6 @@ class MCContext { CodeViewContext &getCVContext(); - void setAllowTemporaryLabels(bool Value) { AllowTemporaryLabels = Value; } void setUseNamesOnTempLabels(bool Value) { UseNamesOnTempLabels = Value; } /// \name Module Lifetime Management diff --git a/llvm/lib/MC/MCContext.cpp b/llvm/lib/MC/MCContext.cpp index fa1b095d42a298..0522f1bd7c7e4a 100644 --- a/llvm/lib/MC/MCContext.cpp +++ b/llvm/lib/MC/MCContext.cpp @@ -74,7 +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); + SaveTempLabels = TargetOptions && TargetOptions->MCSaveTempLabels; SecureLogFile = TargetOptions ? TargetOptions->AsSecureLogFile : ""; if (SrcMgr && SrcMgr->getNumBuffers()) @@ -268,7 +268,7 @@ MCSymbol *MCContext::createSymbol(StringRef Name, bool AlwaysAddSuffix, bool IsTemporary) { // Determine whether this is a user written assembler temporary or normal // label, if used. - if (AllowTemporaryLabels && !IsTemporary) + if (!SaveTempLabels && !IsTemporary) IsTemporary = Name.starts_with(MAI->getPrivateGlobalPrefix()); SmallString<128> NewName = Name;