Skip to content

Commit 2989ed7

Browse files
svenvhjsji
authored andcommitted
Remove unnecessary semicolons (#2071)
Original commit: KhronosGroup/SPIRV-LLVM-Translator@b045a91
1 parent 4dd0b0a commit 2989ed7

File tree

4 files changed

+30
-30
lines changed

4 files changed

+30
-30
lines changed

llvm-spirv/lib/SPIRV/Mangler/ParameterType.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,10 +153,10 @@ struct TypeVisitor;
153153
struct ParamType {
154154
/// @brief Constructor.
155155
/// @param TypeEnum type id.
156-
ParamType(TypeEnum TypeId) : TypeId(TypeId){};
156+
ParamType(TypeEnum TypeId) : TypeId(TypeId) {}
157157

158158
/// @brief Destructor.
159-
virtual ~ParamType(){};
159+
virtual ~ParamType() {}
160160

161161
/// Abstract Methods ///
162162

llvm-spirv/lib/SPIRV/libSPIRV/SPIRVDecorate.h

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ class SPIRVDecorationGroup : public SPIRVEntry {
371371
SPIRVDecorationGroup(SPIRVModule *TheModule, SPIRVId TheId)
372372
: SPIRVEntry(TheModule, WC, OC, TheId) {
373373
validate();
374-
};
374+
}
375375
// Incomplete constructor
376376
SPIRVDecorationGroup() : SPIRVEntry(OC) {}
377377
void encodeAll(spv_ostream &O) const override;
@@ -631,12 +631,12 @@ class SPIRVDecorateFunctionRoundingModeINTEL : public SPIRVDecorate {
631631
SPIRVWord TargetWidth,
632632
spv::FPRoundingMode FloatControl)
633633
: SPIRVDecorate(spv::DecorationFunctionRoundingModeINTEL, TheTarget,
634-
TargetWidth, static_cast<SPIRVWord>(FloatControl)){};
634+
TargetWidth, static_cast<SPIRVWord>(FloatControl)) {}
635635

636-
SPIRVWord getTargetWidth() const { return Literals.at(0); };
636+
SPIRVWord getTargetWidth() const { return Literals.at(0); }
637637
spv::FPRoundingMode getRoundingMode() const {
638638
return static_cast<spv::FPRoundingMode>(Literals.at(1));
639-
};
639+
}
640640
};
641641

642642
class SPIRVDecorateFunctionDenormModeINTEL : public SPIRVDecorate {
@@ -646,12 +646,12 @@ class SPIRVDecorateFunctionDenormModeINTEL : public SPIRVDecorate {
646646
SPIRVWord TargetWidth,
647647
spv::FPDenormMode FloatControl)
648648
: SPIRVDecorate(spv::DecorationFunctionDenormModeINTEL, TheTarget,
649-
TargetWidth, static_cast<SPIRVWord>(FloatControl)){};
649+
TargetWidth, static_cast<SPIRVWord>(FloatControl)) {}
650650

651-
SPIRVWord getTargetWidth() const { return Literals.at(0); };
651+
SPIRVWord getTargetWidth() const { return Literals.at(0); }
652652
spv::FPDenormMode getDenormMode() const {
653653
return static_cast<spv::FPDenormMode>(Literals.at(1));
654-
};
654+
}
655655
};
656656

657657
class SPIRVDecorateFunctionFloatingPointModeINTEL : public SPIRVDecorate {
@@ -661,19 +661,19 @@ class SPIRVDecorateFunctionFloatingPointModeINTEL : public SPIRVDecorate {
661661
SPIRVWord TargetWidth,
662662
spv::FPOperationMode FloatControl)
663663
: SPIRVDecorate(spv::DecorationFunctionFloatingPointModeINTEL, TheTarget,
664-
TargetWidth, static_cast<SPIRVWord>(FloatControl)){};
664+
TargetWidth, static_cast<SPIRVWord>(FloatControl)) {}
665665

666-
SPIRVWord getTargetWidth() const { return Literals.at(0); };
666+
SPIRVWord getTargetWidth() const { return Literals.at(0); }
667667
spv::FPOperationMode getOperationMode() const {
668668
return static_cast<spv::FPOperationMode>(Literals.at(1));
669-
};
669+
}
670670
};
671671

672672
class SPIRVDecorateStallEnableINTEL : public SPIRVDecorate {
673673
public:
674674
// Complete constructor for SPIRVDecorateStallEnableINTEL
675675
SPIRVDecorateStallEnableINTEL(SPIRVEntry *TheTarget)
676-
: SPIRVDecorate(spv::DecorationStallEnableINTEL, TheTarget){};
676+
: SPIRVDecorate(spv::DecorationStallEnableINTEL, TheTarget) {}
677677
};
678678

679679
class SPIRVDecorateFuseLoopsInFunctionINTEL : public SPIRVDecorate {
@@ -682,7 +682,7 @@ class SPIRVDecorateFuseLoopsInFunctionINTEL : public SPIRVDecorate {
682682
SPIRVDecorateFuseLoopsInFunctionINTEL(SPIRVEntry *TheTarget, SPIRVWord Depth,
683683
SPIRVWord Independent)
684684
: SPIRVDecorate(spv::DecorationFuseLoopsInFunctionINTEL, TheTarget, Depth,
685-
Independent){};
685+
Independent) {}
686686
};
687687

688688
class SPIRVDecorateMathOpDSPModeINTEL : public SPIRVDecorate {
@@ -691,44 +691,44 @@ class SPIRVDecorateMathOpDSPModeINTEL : public SPIRVDecorate {
691691
SPIRVDecorateMathOpDSPModeINTEL(SPIRVEntry *TheTarget, SPIRVWord Mode,
692692
SPIRVWord Propagate)
693693
: SPIRVDecorate(spv::DecorationMathOpDSPModeINTEL, TheTarget, Mode,
694-
Propagate){};
694+
Propagate) {}
695695
};
696696

697697
class SPIRVDecorateAliasScopeINTEL : public SPIRVDecorateId {
698698
public:
699699
// Complete constructor for SPIRVDecorateAliasScopeINTEL
700700
SPIRVDecorateAliasScopeINTEL(SPIRVEntry *TheTarget, SPIRVId AliasList)
701-
: SPIRVDecorateId(spv::DecorationAliasScopeINTEL, TheTarget, AliasList){};
701+
: SPIRVDecorateId(spv::DecorationAliasScopeINTEL, TheTarget, AliasList) {}
702702
};
703703

704704
class SPIRVDecorateNoAliasINTEL : public SPIRVDecorateId {
705705
public:
706706
// Complete constructor for SPIRVDecorateNoAliasINTEL
707707
SPIRVDecorateNoAliasINTEL(SPIRVEntry *TheTarget, SPIRVId AliasList)
708-
: SPIRVDecorateId(spv::DecorationNoAliasINTEL, TheTarget, AliasList){};
708+
: SPIRVDecorateId(spv::DecorationNoAliasINTEL, TheTarget, AliasList) {}
709709
};
710710

711711
class SPIRVDecorateInitiationIntervalINTEL : public SPIRVDecorate {
712712
public:
713713
// Complete constructor for SPIRVDecorateInitiationIntervalINTEL
714714
SPIRVDecorateInitiationIntervalINTEL(SPIRVEntry *TheTarget, SPIRVWord Cycles)
715715
: SPIRVDecorate(spv::DecorationInitiationIntervalINTEL, TheTarget,
716-
Cycles){};
716+
Cycles) {}
717717
};
718718

719719
class SPIRVDecorateMaxConcurrencyINTEL : public SPIRVDecorate {
720720
public:
721721
// Complete constructor for SPIRVDecorateMaxConcurrencyINTEL
722722
SPIRVDecorateMaxConcurrencyINTEL(SPIRVEntry *TheTarget, SPIRVWord Invocations)
723723
: SPIRVDecorate(spv::DecorationMaxConcurrencyINTEL, TheTarget,
724-
Invocations){};
724+
Invocations) {}
725725
};
726726

727727
class SPIRVDecoratePipelineEnableINTEL : public SPIRVDecorate {
728728
public:
729729
// Complete constructor for SPIRVDecoratePipelineEnableINTEL
730730
SPIRVDecoratePipelineEnableINTEL(SPIRVEntry *TheTarget, SPIRVWord Enable)
731-
: SPIRVDecorate(spv::DecorationPipelineEnableINTEL, TheTarget, Enable){};
731+
: SPIRVDecorate(spv::DecorationPipelineEnableINTEL, TheTarget, Enable) {}
732732
};
733733

734734
class SPIRVDecorateHostAccessINTEL : public SPIRVDecorate {
@@ -741,7 +741,7 @@ class SPIRVDecorateHostAccessINTEL : public SPIRVDecorate {
741741
for (auto &I : getVec(VarName))
742742
Literals.push_back(I);
743743
WordCount += Literals.size();
744-
};
744+
}
745745

746746
SPIRVWord getAccessMode() const { return Literals.front(); }
747747
std::string getVarName() const {
@@ -783,15 +783,15 @@ class SPIRVDecorateInitModeINTEL : public SPIRVDecorate {
783783
// Complete constructor for SPIRVInitModeINTEL
784784
SPIRVDecorateInitModeINTEL(SPIRVEntry *TheTarget, SPIRVWord Trigger)
785785
: SPIRVDecorate(spv::internal::DecorationInitModeINTEL, TheTarget,
786-
Trigger){};
786+
Trigger) {}
787787
};
788788

789789
class SPIRVDecorateImplementInCSRINTEL : public SPIRVDecorate {
790790
public:
791791
// Complete constructor for SPIRVImplementInCSRINTEL
792792
SPIRVDecorateImplementInCSRINTEL(SPIRVEntry *TheTarget, SPIRVWord Value)
793793
: SPIRVDecorate(spv::internal::DecorationImplementInCSRINTEL, TheTarget,
794-
Value){};
794+
Value) {}
795795
};
796796

797797
} // namespace SPIRV

llvm-spirv/lib/SPIRV/libSPIRV/SPIRVEntry.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ class SPIRVEntry {
366366
void setLinkageType(SPIRVLinkageTypeKind);
367367
void setModule(SPIRVModule *TheModule);
368368
void setName(const std::string &TheName);
369-
virtual void setScope(SPIRVEntry *Scope){};
369+
virtual void setScope(SPIRVEntry *Scope) {}
370370
void takeAnnotations(SPIRVForward *);
371371
void takeDecorates(SPIRVEntry *);
372372
void takeDecorateIds(SPIRVEntry *);

llvm-spirv/lib/SPIRV/libSPIRV/SPIRVInstruction.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,11 +81,11 @@ class SPIRVComponentMemorySemanticsMask {
8181

8282
class SPIRVComponentOperands {
8383
public:
84-
SPIRVComponentOperands(){};
84+
SPIRVComponentOperands() {}
8585
SPIRVComponentOperands(const std::vector<SPIRVValue *> &TheOperands)
86-
: Operands(TheOperands){};
86+
: Operands(TheOperands) {}
8787
SPIRVComponentOperands(std::vector<SPIRVValue *> &&TheOperands)
88-
: Operands(std::move(TheOperands)){};
88+
: Operands(std::move(TheOperands)) {}
8989
std::vector<SPIRVValue *> getCompOperands() { return Operands; }
9090
std::vector<SPIRVType *> getCompOperandTypes() {
9191
std::vector<SPIRVType *> Tys;
@@ -2266,7 +2266,7 @@ template <Op OC> class SPIRVLifetime : public SPIRVInstruction {
22662266
: SPIRVInstruction(3, OC, TheBB), Object(TheObject), Size(TheSize) {
22672267
validate();
22682268
assert(TheBB && "Invalid BB");
2269-
};
2269+
}
22702270
// Incomplete constructor
22712271
SPIRVLifetime()
22722272
: SPIRVInstruction(OC), Object(SPIRVID_INVALID), Size(SPIRVWORD_MAX) {
@@ -2276,8 +2276,8 @@ template <Op OC> class SPIRVLifetime : public SPIRVInstruction {
22762276
SPIRVCapVec getRequiredCapability() const override {
22772277
return getVec(CapabilityKernel);
22782278
}
2279-
SPIRVValue *getObject() { return getValue(Object); };
2280-
SPIRVWord getSize() { return Size; };
2279+
SPIRVValue *getObject() { return getValue(Object); }
2280+
SPIRVWord getSize() { return Size; }
22812281

22822282
protected:
22832283
void validate() const override {

0 commit comments

Comments
 (0)