[llvm] d125e71 - [MC] Remove setAllowTemporaryLabels and rename AllowTemporaryLabels

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 12 17:07:16 PDT 2024


Author: Fangrui Song
Date: 2024-06-12T17:07:11-07:00
New Revision: d125e717df24b2d310d934cca5daf6589566a0d6

URL: https://github.com/llvm/llvm-project/commit/d125e717df24b2d310d934cca5daf6589566a0d6
DIFF: https://github.com/llvm/llvm-project/commit/d125e717df24b2d310d934cca5daf6589566a0d6.diff

LOG: [MC] Remove setAllowTemporaryLabels and rename AllowTemporaryLabels

Follow-up to a91c8398f22c28618d681497e9856c3a4b8753c3.

Added: 
    

Modified: 
    llvm/include/llvm/MC/MCContext.h
    llvm/lib/MC/MCContext.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/MC/MCContext.h b/llvm/include/llvm/MC/MCContext.h
index 72eae85467dc9..ad412409b3e13 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
   /// 
diff erences 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 fa1b095d42a29..0522f1bd7c7e4 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;


        


More information about the llvm-commits mailing list