]> granicus.if.org Git - clang/commitdiff
[Basic] Fix -Wreorder warning
authorBenjamin Kramer <benny.kra@googlemail.com>
Wed, 13 Jun 2018 16:45:12 +0000 (16:45 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Wed, 13 Jun 2018 16:45:12 +0000 (16:45 +0000)
Just use field initializers that don't suffer from this problem

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@334619 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Basic/Targets/PPC.h

index 70d0f1c2cd4fed7921725e87705d4648058c236a..d5ccdd1b11ed9c3f0c89ea35d4de8c7faa1ba00a 100644 (file)
@@ -49,33 +49,30 @@ class LLVM_LIBRARY_VISIBILITY PPCTargetInfo : public TargetInfo {
   } ArchDefineTypes;
 
 
-  ArchDefineTypes ArchDefs;
+  ArchDefineTypes ArchDefs = ArchDefineNone;
   static const Builtin::Info BuiltinInfo[];
   static const char *const GCCRegNames[];
   static const TargetInfo::GCCRegAlias GCCRegAliases[];
   std::string CPU;
 
   // Target cpu features.
-  bool HasAltivec;
-  bool HasVSX;
-  bool HasP8Vector;
-  bool HasP8Crypto;
-  bool HasDirectMove;
-  bool HasQPX;
-  bool HasHTM;
-  bool HasBPERMD;
-  bool HasExtDiv;
-  bool HasP9Vector;
+  bool HasAltivec = false;
+  bool HasVSX = false;
+  bool HasP8Vector = false;
+  bool HasP8Crypto = false;
+  bool HasDirectMove = false;
+  bool HasQPX = false;
+  bool HasHTM = false;
+  bool HasBPERMD = false;
+  bool HasExtDiv = false;
+  bool HasP9Vector = false;
 
 protected:
   std::string ABI;
 
 public:
   PPCTargetInfo(const llvm::Triple &Triple, const TargetOptions &)
-      : TargetInfo(Triple), HasAltivec(false), HasVSX(false),
-        HasP8Vector(false), HasP8Crypto(false), HasDirectMove(false),
-        HasQPX(false), HasHTM(false), HasBPERMD(false), HasExtDiv(false),
-        HasP9Vector(false), ArchDefs(ArchDefineNone) {
+      : TargetInfo(Triple) {
     SuitableAlign = 128;
     SimdDefaultAlign = 128;
     LongDoubleWidth = LongDoubleAlign = 128;