[llvm] 4e87fdd - [NFC] Delete the redundant member 'shouldEmitMoves' from DwarfCFIException class

via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 23 18:05:59 PDT 2021


Author: RamNalamothu
Date: 2021-04-24T06:35:39+05:30
New Revision: 4e87fdd78643f0fd26f1675c339c4de1dc8b1dcb

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

LOG: [NFC] Delete the redundant member 'shouldEmitMoves' from DwarfCFIException class

The data member 'shouldEmitMoves' is only used in DwarfCFIException::beginFunction()
and 'shouldEmitCFI' in DwarfCFIExceptionBase serves its purpose.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D101155

Added: 
    

Modified: 
    llvm/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp
    llvm/lib/CodeGen/AsmPrinter/DwarfException.h

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp
index c20ac6040aef7..4b08e7d284686 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp
@@ -53,8 +53,7 @@ void DwarfCFIExceptionBase::endFragment() {
 
 DwarfCFIException::DwarfCFIException(AsmPrinter *A)
     : DwarfCFIExceptionBase(A), shouldEmitPersonality(false),
-      forceEmitPersonality(false), shouldEmitLSDA(false),
-      shouldEmitMoves(false) {}
+      forceEmitPersonality(false), shouldEmitLSDA(false) {}
 
 DwarfCFIException::~DwarfCFIException() {}
 
@@ -87,7 +86,7 @@ static MCSymbol *getExceptionSym(AsmPrinter *Asm,
 }
 
 void DwarfCFIException::beginFunction(const MachineFunction *MF) {
-  shouldEmitMoves = shouldEmitPersonality = shouldEmitLSDA = false;
+  shouldEmitPersonality = shouldEmitLSDA = false;
   const Function &F = MF->getFunction();
 
   // If any landing pads survive, we need an EH table.
@@ -96,7 +95,7 @@ void DwarfCFIException::beginFunction(const MachineFunction *MF) {
   // See if we need frame move info.
   AsmPrinter::CFIMoveType MoveType = Asm->needsCFIMoves();
 
-  shouldEmitMoves = MoveType != AsmPrinter::CFI_M_None;
+  bool shouldEmitMoves = MoveType != AsmPrinter::CFI_M_None;
 
   const TargetLoweringObjectFile &TLOF = Asm->getObjFileLowering();
   unsigned PerEncoding = TLOF.getPersonalityEncoding();

diff  --git a/llvm/lib/CodeGen/AsmPrinter/DwarfException.h b/llvm/lib/CodeGen/AsmPrinter/DwarfException.h
index b19b4365383f5..40898c9fc8551 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfException.h
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfException.h
@@ -44,9 +44,6 @@ class LLVM_LIBRARY_VISIBILITY DwarfCFIException : public DwarfCFIExceptionBase {
   /// Per-function flag to indicate if .cfi_lsda should be emitted.
   bool shouldEmitLSDA;
 
-  /// Per-function flag to indicate if frame moves info should be emitted.
-  bool shouldEmitMoves;
-
 public:
   //===--------------------------------------------------------------------===//
   // Main entry points.


        


More information about the llvm-commits mailing list