@@ -6366,23 +6366,23 @@ class HLSLAttributedResourceType : public Type, public llvm::FoldingSetNode {
63666366class SpirvOperand {
63676367public:
63686368 enum SpirvOperandKind : unsigned char {
6369- kInvalid , // /< Uninitialized.
6370- kConstantId , // /< Integral value to represent as a SPIR-V OpConstant
6371- // /< instruction ID.
6372- kLiteral , // /< Integral value to represent as an immediate literal.
6373- kTypeId , // /< Type to represent as a SPIR-V type ID.
6369+ Invalid , // /< Uninitialized.
6370+ ConstantId , // /< Integral value to represent as a SPIR-V OpConstant
6371+ // /< instruction ID.
6372+ Literal , // /< Integral value to represent as an immediate literal.
6373+ TypeId , // /< Type to represent as a SPIR-V type ID.
63746374
6375- kMax ,
6375+ Max ,
63766376 };
63776377
63786378private:
6379- SpirvOperandKind Kind = kInvalid ;
6379+ SpirvOperandKind Kind = Invalid ;
63806380
63816381 QualType ResultType;
63826382 llvm::APInt Value; // Signedness of constants is represented by ResultType.
63836383
63846384public:
6385- SpirvOperand () : Kind(kInvalid ), ResultType() {}
6385+ SpirvOperand () : Kind(Invalid ), ResultType() {}
63866386
63876387 SpirvOperand (SpirvOperandKind Kind, QualType ResultType, llvm::APInt Value)
63886388 : Kind(Kind), ResultType(ResultType), Value(Value) {}
@@ -6406,10 +6406,10 @@ class SpirvOperand {
64066406
64076407 SpirvOperandKind getKind () const { return Kind; }
64086408
6409- bool isValid () const { return Kind != kInvalid && Kind < kMax ; }
6410- bool isConstant () const { return Kind == kConstantId ; }
6411- bool isLiteral () const { return Kind == kLiteral ; }
6412- bool isType () const { return Kind == kTypeId ; }
6409+ bool isValid () const { return Kind != Invalid && Kind < Max ; }
6410+ bool isConstant () const { return Kind == ConstantId ; }
6411+ bool isLiteral () const { return Kind == Literal ; }
6412+ bool isType () const { return Kind == TypeId ; }
64136413
64146414 llvm::APInt getValue () const {
64156415 assert ((isConstant () || isLiteral ()) &&
@@ -6424,15 +6424,15 @@ class SpirvOperand {
64246424 }
64256425
64266426 static SpirvOperand createConstant (QualType ResultType, llvm::APInt Val) {
6427- return SpirvOperand (kConstantId , ResultType, Val);
6427+ return SpirvOperand (ConstantId , ResultType, Val);
64286428 }
64296429
64306430 static SpirvOperand createLiteral (llvm::APInt Val) {
6431- return SpirvOperand (kLiteral , QualType (), Val);
6431+ return SpirvOperand (Literal , QualType (), Val);
64326432 }
64336433
64346434 static SpirvOperand createType (QualType T) {
6435- return SpirvOperand (kTypeId , T, llvm::APSInt ());
6435+ return SpirvOperand (TypeId , T, llvm::APSInt ());
64366436 }
64376437
64386438 void Profile (llvm::FoldingSetNodeID &ID) const {
@@ -6460,9 +6460,8 @@ class HLSLInlineSpirvType final
64606460 ArrayRef<SpirvOperand> Operands)
64616461 : Type(HLSLInlineSpirv, QualType(), TypeDependence::None), Opcode(Opcode),
64626462 Size (Size), Alignment(Alignment), NumOperands(Operands.size()) {
6463- for (size_t I = 0 ; I < NumOperands; I++) {
6463+ for (size_t I = 0 ; I < NumOperands; I++)
64646464 getTrailingObjects<SpirvOperand>()[I] = Operands[I];
6465- }
64666465 }
64676466
64686467public:
@@ -6486,9 +6485,8 @@ class HLSLInlineSpirvType final
64866485 ID.AddInteger (Opcode);
64876486 ID.AddInteger (Size);
64886487 ID.AddInteger (Alignment);
6489- for (auto &Operand : Operands) {
6488+ for (auto &Operand : Operands)
64906489 Operand.Profile (ID);
6491- }
64926490 }
64936491
64946492 static bool classof (const Type *T) {
0 commit comments