[llvm] c0b475b - [NFC][AVR] Use inline field initializers
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 10 17:49:18 PST 2023
Author: Vitaly Buka
Date: 2023-01-10T17:48:37-08:00
New Revision: c0b475bd5ec9f4e4fefbb664ced4259ef17547b9
URL: https://github.com/llvm/llvm-project/commit/c0b475bd5ec9f4e4fefbb664ced4259ef17547b9
DIFF: https://github.com/llvm/llvm-project/commit/c0b475bd5ec9f4e4fefbb664ced4259ef17547b9.diff
LOG: [NFC][AVR] Use inline field initializers
Added:
Modified:
llvm/lib/Target/AVR/AVRSubtarget.cpp
llvm/lib/Target/AVR/AVRSubtarget.h
Removed:
################################################################################
diff --git a/llvm/lib/Target/AVR/AVRSubtarget.cpp b/llvm/lib/Target/AVR/AVRSubtarget.cpp
index 184ad4399069..c4e8d9afd3a9 100644
--- a/llvm/lib/Target/AVR/AVRSubtarget.cpp
+++ b/llvm/lib/Target/AVR/AVRSubtarget.cpp
@@ -29,17 +29,7 @@ namespace llvm {
AVRSubtarget::AVRSubtarget(const Triple &TT, const std::string &CPU,
const std::string &FS, const AVRTargetMachine &TM)
- : AVRGenSubtargetInfo(TT, CPU, /*TuneCPU*/ CPU, FS), ELFArch(0),
-
- // Subtarget features
- m_hasSRAM(false), m_hasJMPCALL(false), m_hasIJMPCALL(false),
- m_hasEIJMPCALL(false), m_hasADDSUBIW(false), m_hasSmallStack(false),
- m_hasMOVW(false), m_hasLPM(false), m_hasLPMX(false), m_hasELPM(false),
- m_hasELPMX(false), m_hasPROGMEM(false), m_hasSPM(false), m_hasSPMX(false),
- m_hasDES(false), m_supportsRMW(false), m_supportsMultiplication(false),
- m_hasBREAK(false), m_hasTinyEncoding(false), m_hasMemMappedGPR(false),
- m_FeatureSetDummy(false),
-
+ : AVRGenSubtargetInfo(TT, CPU, /*TuneCPU*/ CPU, FS),
TLInfo(TM, initializeSubtargetDependencies(CPU, FS, TM)) {
// Parse features string.
ParseSubtargetFeatures(CPU, /*TuneCPU*/ CPU, FS);
diff --git a/llvm/lib/Target/AVR/AVRSubtarget.h b/llvm/lib/Target/AVR/AVRSubtarget.h
index 10ae4d276f37..25046e6cf1ea 100644
--- a/llvm/lib/Target/AVR/AVRSubtarget.h
+++ b/llvm/lib/Target/AVR/AVRSubtarget.h
@@ -113,34 +113,34 @@ class AVRSubtarget : public AVRGenSubtargetInfo {
private:
/// The ELF e_flags architecture.
- unsigned ELFArch;
+ unsigned ELFArch = 0;
// Subtarget feature settings
// See AVR.td for details.
- bool m_hasSRAM;
- bool m_hasJMPCALL;
- bool m_hasIJMPCALL;
- bool m_hasEIJMPCALL;
- bool m_hasADDSUBIW;
- bool m_hasSmallStack;
- bool m_hasMOVW;
- bool m_hasLPM;
- bool m_hasLPMX;
- bool m_hasELPM;
- bool m_hasELPMX;
- bool m_hasPROGMEM;
- bool m_hasSPM;
- bool m_hasSPMX;
- bool m_hasDES;
- bool m_supportsRMW;
- bool m_supportsMultiplication;
- bool m_hasBREAK;
- bool m_hasTinyEncoding;
- bool m_hasMemMappedGPR;
+ bool m_hasSRAM = false;
+ bool m_hasJMPCALL = false;
+ bool m_hasIJMPCALL = false;
+ bool m_hasEIJMPCALL = false;
+ bool m_hasADDSUBIW = false;
+ bool m_hasSmallStack = false;
+ bool m_hasMOVW = false;
+ bool m_hasLPM = false;
+ bool m_hasLPMX = false;
+ bool m_hasELPM = false;
+ bool m_hasELPMX = false;
+ bool m_hasPROGMEM = false;
+ bool m_hasSPM = false;
+ bool m_hasSPMX = false;
+ bool m_hasDES = false;
+ bool m_supportsRMW = false;
+ bool m_supportsMultiplication = false;
+ bool m_hasBREAK = false;
+ bool m_hasTinyEncoding = false;
+ bool m_hasMemMappedGPR = false;
// Dummy member, used by FeatureSet's. We cannot have a SubtargetFeature with
// no variable, so we instead bind pseudo features to this variable.
- bool m_FeatureSetDummy;
+ bool m_FeatureSetDummy = false;
AVRInstrInfo InstrInfo;
AVRFrameLowering FrameLowering;
More information about the llvm-commits
mailing list