Skip to content

Commit

Permalink
[MC] Remove setAllowTemporaryLabels and rename AllowTemporaryLabels
Browse files Browse the repository at this point in the history
Follow-up to a91c839.
  • Loading branch information
MaskRay committed Jun 13, 2024
1 parent a91c839 commit d125e71
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions llvm/include/llvm/MC/MCContext.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -421,7 +421,6 @@ class MCContext {

CodeViewContext &getCVContext();

void setAllowTemporaryLabels(bool Value) { AllowTemporaryLabels = Value; }
void setUseNamesOnTempLabels(bool Value) { UseNamesOnTempLabels = Value; }

/// \name Module Lifetime Management
Expand Down
4 changes: 2 additions & 2 deletions llvm/lib/MC/MCContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit d125e71

Please sign in to comment.