diff --git a/llvm/include/llvm/Frontend/Directive/DirectiveBase.td b/llvm/include/llvm/Frontend/Directive/DirectiveBase.td --- a/llvm/include/llvm/Frontend/Directive/DirectiveBase.td +++ b/llvm/include/llvm/Frontend/Directive/DirectiveBase.td @@ -35,10 +35,10 @@ // Make the enum values available in the namespace. This allows us to // write something like Enum_X if we have a `using namespace cppNamespace`. - bit makeEnumAvailableInNamespace = 0; + bit makeEnumAvailableInNamespace = false; // Generate include and macro to enable LLVM BitmaskEnum. - bit enableBitmaskEnumInNamespace = 0; + bit enableBitmaskEnumInNamespace = false; // Header file included in the implementation code generated. Ususally the // output file of the declaration code generation. Can be left blank. @@ -63,7 +63,7 @@ bit isUserValue = uv; // Set clause value used by default when unknown. - bit isDefault = 0; + bit isDefault = false; } // Information about a specific clause. @@ -87,27 +87,27 @@ // Optional class holding value of the clause in flang AST. string flangClassValue = ""; - // If set to 1, value is optional. Not optional by default. - bit isValueOptional = 0; + // If set to true, value is optional. Not optional by default. + bit isValueOptional = false; // Name of enum when there is a list of allowed clause values. string enumClauseValue = ""; // List of allowed clause values list allowedClauseValues = []; - // If set to 1, value class is part of a list. Single class by default. - bit isValueList = 0; + // If set to true, value class is part of a list. Single class by default. + bit isValueList = false; // Define a default value such as "*". string defaultValue = ""; // Is clause implicit? If clause is set as implicit, the default kind will // be return in getClauseKind instead of their own kind. - bit isImplicit = 0; + bit isImplicit = false; // Set clause used by default when unknown. Function returning the kind // of enumeration will use this clause as the default. - bit isDefault = 0; + bit isDefault = false; } // Hold information about clause validity by version. @@ -148,5 +148,5 @@ list requiredClauses = []; // Set directive used by default when unknown. - bit isDefault = 0; + bit isDefault = false; } diff --git a/llvm/include/llvm/Frontend/OpenACC/ACC.td b/llvm/include/llvm/Frontend/OpenACC/ACC.td --- a/llvm/include/llvm/Frontend/OpenACC/ACC.td +++ b/llvm/include/llvm/Frontend/OpenACC/ACC.td @@ -21,8 +21,8 @@ let cppNamespace = "acc"; // final namespace will be llvm::acc let directivePrefix = "ACCD_"; let clausePrefix = "ACCC_"; - let makeEnumAvailableInNamespace = 1; - let enableBitmaskEnumInNamespace = 1; + let makeEnumAvailableInNamespace = true; + let enableBitmaskEnumInNamespace = true; let includeHeader = "llvm/Frontend/OpenACC/ACC.h.inc"; let clauseEnumSetClass = "AccClauseSet"; let flangClauseBaseClass = "AccClause"; @@ -35,7 +35,7 @@ // 2.16.1 def ACCC_Async : Clause<"async"> { let flangClassValue = "ScalarIntExpr"; - let isValueOptional = 1; + let isValueOptional = true; } // 2.9.6 @@ -123,8 +123,8 @@ def ACCC_DeviceType : Clause<"device_type"> { let flangClassValue = "ScalarIntExpr"; let defaultValue = "*"; - let isValueOptional = 1; - let isValueList = 1; + let isValueOptional = true; + let isValueList = true; } // 2.6.6 @@ -138,7 +138,7 @@ // 2.9.2 def ACCC_Gang : Clause<"gang"> { let flangClassValue = "AccGangArgument"; - let isValueOptional = 1; + let isValueOptional = true; } // 2.14.4 @@ -211,7 +211,7 @@ // 2.5.5 def ACCC_Self : Clause<"self"> { let flangClassValue = "ScalarLogicalExpr"; - let isValueOptional = 1; + let isValueOptional = true; } // 2.9.5 @@ -220,7 +220,7 @@ // 2.9.4 def ACCC_Vector : Clause<"vector"> { let flangClassValue = "ScalarIntExpr"; - let isValueOptional = 1; + let isValueOptional = true; } // 2.5.10 @@ -231,20 +231,20 @@ // 2.16.2 def ACCC_Wait : Clause<"wait"> { let flangClassValue = "AccWaitArgument"; - let isValueOptional = 1; + let isValueOptional = true; } // 2.9.3 def ACCC_Worker: Clause<"worker"> { let flangClassValue = "ScalarIntExpr"; - let isValueOptional = 1; + let isValueOptional = true; } // 2.12 def ACCC_Write : Clause<"write"> {} def ACCC_Unknown : Clause<"unknown"> { - let isDefault = 1; + let isDefault = true; } //===----------------------------------------------------------------------===// @@ -614,5 +614,5 @@ } def ACC_Unknown : Directive<"unknown"> { - let isDefault = 1; + let isDefault = true; } diff --git a/llvm/include/llvm/Frontend/OpenMP/OMP.td b/llvm/include/llvm/Frontend/OpenMP/OMP.td --- a/llvm/include/llvm/Frontend/OpenMP/OMP.td +++ b/llvm/include/llvm/Frontend/OpenMP/OMP.td @@ -21,8 +21,8 @@ let cppNamespace = "omp"; // final namespace will be llvm::omp let directivePrefix = "OMPD_"; let clausePrefix = "OMPC_"; - let makeEnumAvailableInNamespace = 1; - let enableBitmaskEnumInNamespace = 1; + let makeEnumAvailableInNamespace = true; + let enableBitmaskEnumInNamespace = true; let includeHeader = "llvm/Frontend/OpenMP/OMP.h.inc"; let clauseEnumSetClass = "OmpClauseSet"; let flangClauseBaseClass = "OmpClause"; @@ -103,7 +103,7 @@ def OMP_PROC_BIND_close : ClauseVal<"close",3,1> {} def OMP_PROC_BIND_spread : ClauseVal<"spread",4,1> {} def OMP_PROC_BIND_default : ClauseVal<"default",5,0> {} -def OMP_PROC_BIND_unknown : ClauseVal<"unknown",6,0> { let isDefault = 1; } +def OMP_PROC_BIND_unknown : ClauseVal<"unknown",6,0> { let isDefault = true; } def OMPC_ProcBind : Clause<"proc_bind"> { let clangClass = "OMPProcBindClause"; let flangClass = "OmpProcBindClause"; @@ -123,7 +123,7 @@ def OMPC_Ordered : Clause<"ordered"> { let clangClass = "OMPOrderedClause"; let flangClassValue = "ScalarIntConstantExpr"; - let isValueOptional = 1; + let isValueOptional = true; } def OMPC_NoWait : Clause<"nowait"> { let clangClass = "OMPNowaitClause"; @@ -187,7 +187,7 @@ let clangClass = "OMPDistScheduleClause"; let flangClass = "OmpDistScheduleClause"; let flangClassValue = "ScalarIntExpr"; - let isValueOptional = 1; + let isValueOptional = true; } def OMPC_DefaultMap : Clause<"defaultmap"> { let clangClass = "OMPDefaultmapClause"; @@ -204,12 +204,12 @@ def OMPC_UseDevicePtr : Clause<"use_device_ptr"> { let clangClass = "OMPUseDevicePtrClause"; let flangClassValue = "Name"; - let isValueList = 1; + let isValueList = true; } def OMPC_IsDevicePtr : Clause<"is_device_ptr"> { let clangClass = "OMPIsDevicePtrClause"; let flangClassValue = "Name"; - let isValueList = 1; + let isValueList = true; } def OMPC_TaskReduction : Clause<"task_reduction"> { let clangClass = "OMPTaskReductionClause"; @@ -265,25 +265,25 @@ } def OMPC_Uniform : Clause<"uniform"> { let flangClassValue = "Name"; - let isValueList = 1; + let isValueList = true; } def OMPC_DeviceType : Clause<"device_type"> {} def OMPC_Match : Clause<"match"> {} def OMPC_Depobj : Clause<"depobj"> { let clangClass = "OMPDepobjClause"; - let isImplicit = 1; + let isImplicit = true; } def OMPC_Flush : Clause<"flush"> { let clangClass = "OMPFlushClause"; - let isImplicit = 1; + let isImplicit = true; } def OMPC_ThreadPrivate : Clause<"threadprivate"> { let alternativeName = "threadprivate or thread local"; - let isImplicit = 1; + let isImplicit = true; } def OMPC_Unknown : Clause<"unknown"> { - let isImplicit = 1; - let isDefault = 1; + let isImplicit = true; + let isDefault = true; } def OMPC_Link : Clause<"link"> { let flangClassValue = "OmpObjectList"; @@ -1585,5 +1585,5 @@ def OMP_EndSingle : Directive<"end single"> {} def OMP_EndWorkshare : Directive<"end workshare"> {} def OMP_Unknown : Directive<"unknown"> { - let isDefault = 1; + let isDefault = true; } diff --git a/llvm/include/llvm/Option/OptParser.td b/llvm/include/llvm/Option/OptParser.td --- a/llvm/include/llvm/Option/OptParser.td +++ b/llvm/include/llvm/Option/OptParser.td @@ -13,7 +13,7 @@ // Define the kinds of options. -class OptionKind { +class OptionKind { string Name = name; // The kind precedence, kinds with lower precedence are matched first. int Precedence = precedence; @@ -24,9 +24,9 @@ // An option group. def KIND_GROUP : OptionKind<"Group">; // The input option kind. -def KIND_INPUT : OptionKind<"Input", 1, 1>; +def KIND_INPUT : OptionKind<"Input", 1, true>; // The unknown option kind. -def KIND_UNKNOWN : OptionKind<"Unknown", 2, 1>; +def KIND_UNKNOWN : OptionKind<"Unknown", 2, true>; // A flag with no values. def KIND_FLAG : OptionKind<"Flag">; // An option which prefixes its (single) value. @@ -99,7 +99,7 @@ list AliasArgs = []; code KeyPath = ?; code DefaultValue = ?; - bit ShouldAlwaysEmit = 0; + bit ShouldAlwaysEmit = false; code NormalizerRetTy = ?; code NormalizedValuesScope = ""; code Normalizer = ""; @@ -175,7 +175,7 @@ class IsNegative { // todo: create & apply a normalizer for negative flags } -class AlwaysEmit { bit ShouldAlwaysEmit = 1; } +class AlwaysEmit { bit ShouldAlwaysEmit = true; } class Normalizer { code Normalizer = normalizer; } class Denormalizer { code Denormalizer = denormalizer; } class NormalizedValuesScope { code NormalizedValuesScope = scope; } diff --git a/llvm/include/llvm/TableGen/SearchableTable.td b/llvm/include/llvm/TableGen/SearchableTable.td --- a/llvm/include/llvm/TableGen/SearchableTable.td +++ b/llvm/include/llvm/TableGen/SearchableTable.td @@ -103,7 +103,7 @@ string PrimaryKeyName; // See SearchIndex.EarlyOut - bit PrimaryKeyEarlyOut = 0; + bit PrimaryKeyEarlyOut = false; } // Define a record derived from this class to generate an additional search @@ -124,7 +124,7 @@ // instructions. // // Can only be used when the first field is an integral (non-string) type. - bit EarlyOut = 0; + bit EarlyOut = false; } // Legacy table type with integrated enum.