r334619 - [Basic] Fix -Wreorder warning
Benjamin Kramer via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 13 09:45:12 PDT 2018
Author: d0k
Date: Wed Jun 13 09:45:12 2018
New Revision: 334619
URL: http://llvm.org/viewvc/llvm-project?rev=334619&view=rev
Log:
[Basic] Fix -Wreorder warning
Just use field initializers that don't suffer from this problem
Modified:
cfe/trunk/lib/Basic/Targets/PPC.h
Modified: cfe/trunk/lib/Basic/Targets/PPC.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets/PPC.h?rev=334619&r1=334618&r2=334619&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets/PPC.h (original)
+++ cfe/trunk/lib/Basic/Targets/PPC.h Wed Jun 13 09:45:12 2018
@@ -49,33 +49,30 @@ class LLVM_LIBRARY_VISIBILITY PPCTargetI
} 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;
More information about the cfe-commits
mailing list