[llvm] e447950 - [NFC] Fix order of initialization in MCTargetOptions

Andrew Savonichev via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 26 12:34:05 PDT 2022


Author: Andrew Savonichev
Date: 2022-04-26T22:26:00+03:00
New Revision: e4479504837306ec997ad87a2ce2e0e81c62a539

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

LOG: [NFC] Fix order of initialization in MCTargetOptions

This patch fixes a compiler warning after D121299:

field 'MCUseDwarfDirectory' will be initialized after field
'MCIncrementalLinkerCompatible'

Added: 
    

Modified: 
    llvm/lib/MC/MCTargetOptions.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/MC/MCTargetOptions.cpp b/llvm/lib/MC/MCTargetOptions.cpp
index 4e51ab75527f7..bb48182c6622b 100644
--- a/llvm/lib/MC/MCTargetOptions.cpp
+++ b/llvm/lib/MC/MCTargetOptions.cpp
@@ -14,10 +14,10 @@ using namespace llvm;
 MCTargetOptions::MCTargetOptions()
     : MCRelaxAll(false), MCNoExecStack(false), MCFatalWarnings(false),
       MCNoWarn(false), MCNoDeprecatedWarn(false), MCNoTypeCheck(false),
-      MCSaveTempLabels(false), MCUseDwarfDirectory(DefaultDwarfDirectory),
-      MCIncrementalLinkerCompatible(false), ShowMCEncoding(false),
-      ShowMCInst(false), AsmVerbose(false), PreserveAsmComments(true),
-      Dwarf64(false) {}
+      MCSaveTempLabels(false), MCIncrementalLinkerCompatible(false),
+      ShowMCEncoding(false), ShowMCInst(false), AsmVerbose(false),
+      PreserveAsmComments(true), Dwarf64(false),
+      MCUseDwarfDirectory(DefaultDwarfDirectory) {}
 
 StringRef MCTargetOptions::getABIName() const {
   return ABIName;


        


More information about the llvm-commits mailing list