Author: djg Date: Mon Aug 27 09:50:10 2007 New Revision: 41482 URL: http://llvm.org/viewvc/llvm-project?rev=41482&view=rev Log: Add explicit keywords and remove spurious trailing semicolons.
Modified: llvm/trunk/include/llvm/ADT/FoldingSet.h llvm/trunk/include/llvm/CodeGen/LiveInterval.h llvm/trunk/include/llvm/CodeGen/MachineConstantPool.h llvm/trunk/include/llvm/CodeGen/MachineFunction.h llvm/trunk/include/llvm/CodeGen/RegisterScavenging.h llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h llvm/trunk/include/llvm/CodeGen/SimpleRegisterCoalescing.h llvm/trunk/include/llvm/Support/FileUtilities.h llvm/trunk/include/llvm/Target/TargetELFWriterInfo.h llvm/trunk/include/llvm/Target/TargetLowering.h llvm/trunk/lib/CodeGen/DwarfWriter.cpp llvm/trunk/lib/CodeGen/PhysRegTracker.h Modified: llvm/trunk/include/llvm/ADT/FoldingSet.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/FoldingSet.h?rev=41482&r1=41481&r2=41482&view=diff ============================================================================== --- llvm/trunk/include/llvm/ADT/FoldingSet.h (original) +++ llvm/trunk/include/llvm/ADT/FoldingSet.h Mon Aug 27 09:50:10 2007 @@ -119,7 +119,7 @@ unsigned NumNodes; public: - FoldingSetImpl(unsigned Log2InitSize = 6); + explicit FoldingSetImpl(unsigned Log2InitSize = 6); virtual ~FoldingSetImpl(); // Forward declaration. @@ -232,7 +232,7 @@ } public: - FoldingSet(unsigned Log2InitSize = 6) + explicit FoldingSet(unsigned Log2InitSize = 6) : FoldingSetImpl(Log2InitSize) {} Modified: llvm/trunk/include/llvm/CodeGen/LiveInterval.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/LiveInterval.h?rev=41482&r1=41481&r2=41482&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/LiveInterval.h (original) +++ llvm/trunk/include/llvm/CodeGen/LiveInterval.h Mon Aug 27 09:50:10 2007 @@ -96,8 +96,8 @@ unsigned def; unsigned reg; SmallVector<unsigned, 4> kills; - VNInfo() : def(~1U), reg(0) {}; - VNInfo(unsigned d, unsigned r) : def(d), reg(r) {}; + VNInfo() : def(~1U), reg(0) {} + VNInfo(unsigned d, unsigned r) : def(d), reg(r) {} }; private: SmallVector<VNInfo, 4> ValueNumberInfo; Modified: llvm/trunk/include/llvm/CodeGen/MachineConstantPool.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineConstantPool.h?rev=41482&r1=41481&r2=41482&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/MachineConstantPool.h (original) +++ llvm/trunk/include/llvm/CodeGen/MachineConstantPool.h Mon Aug 27 09:50:10 2007 @@ -36,7 +36,7 @@ public: explicit MachineConstantPoolValue(const Type *ty) : Ty(ty) {} - virtual ~MachineConstantPoolValue() {}; + virtual ~MachineConstantPoolValue() {} /// getType - get type of this MachineConstantPoolValue. /// Modified: llvm/trunk/include/llvm/CodeGen/MachineFunction.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineFunction.h?rev=41482&r1=41481&r2=41482&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/MachineFunction.h (original) +++ llvm/trunk/include/llvm/CodeGen/MachineFunction.h Mon Aug 27 09:50:10 2007 @@ -73,7 +73,7 @@ /// of type are accessed/created with MF::getInfo and destroyed when the /// MachineFunction is destroyed. struct MachineFunctionInfo { - virtual ~MachineFunctionInfo() {}; + virtual ~MachineFunctionInfo() {} }; class MachineFunction : private Annotation { Modified: llvm/trunk/include/llvm/CodeGen/RegisterScavenging.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/RegisterScavenging.h?rev=41482&r1=41481&r2=41482&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/RegisterScavenging.h (original) +++ llvm/trunk/include/llvm/CodeGen/RegisterScavenging.h Mon Aug 27 09:50:10 2007 @@ -55,11 +55,11 @@ public: RegScavenger() : MBB(NULL), NumPhysRegs(0), Tracking(false), - ScavengingFrameIndex(-1), ScavengedReg(0), ScavengedRC(NULL) {}; + ScavengingFrameIndex(-1), ScavengedReg(0), ScavengedRC(NULL) {} explicit RegScavenger(MachineBasicBlock *mbb) : MBB(mbb), NumPhysRegs(0), Tracking(false), - ScavengingFrameIndex(-1), ScavengedReg(0), ScavengedRC(NULL) {}; + ScavengingFrameIndex(-1), ScavengedReg(0), ScavengedRC(NULL) {} /// enterBasicBlock - Start tracking liveness from the begin of the specific /// basic block. Modified: llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h?rev=41482&r1=41481&r2=41482&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h (original) +++ llvm/trunk/include/llvm/CodeGen/SelectionDAGISel.h Mon Aug 27 09:50:10 2007 @@ -104,7 +104,7 @@ }; struct JumpTable { JumpTable(unsigned R, unsigned J, MachineBasicBlock *M, - MachineBasicBlock *D): Reg(R), JTI(J), MBB(M), Default(D) {}; + MachineBasicBlock *D): Reg(R), JTI(J), MBB(M), Default(D) {} /// Reg - the virtual register containing the index of the jump table entry //. to jump to. @@ -120,7 +120,7 @@ struct JumpTableHeader { JumpTableHeader(uint64_t F, uint64_t L, Value* SV, MachineBasicBlock* H, bool E = false): - First(F), Last(L), SValue(SV), HeaderBB(H), Emitted(E) {}; + First(F), Last(L), SValue(SV), HeaderBB(H), Emitted(E) {} uint64_t First; uint64_t Last; Value *SValue; @@ -131,7 +131,7 @@ struct BitTestCase { BitTestCase(uint64_t M, MachineBasicBlock* T, MachineBasicBlock* Tr): - Mask(M), ThisBB(T), TargetBB(Tr) { }; + Mask(M), ThisBB(T), TargetBB(Tr) { } uint64_t Mask; MachineBasicBlock* ThisBB; MachineBasicBlock* TargetBB; @@ -145,7 +145,7 @@ MachineBasicBlock* P, MachineBasicBlock* D, const BitTestInfo& C): First(F), Range(R), SValue(SV), Reg(Rg), Emitted(E), - Parent(P), Default(D), Cases(C) { }; + Parent(P), Default(D), Cases(C) { } uint64_t First; uint64_t Range; Value *SValue; Modified: llvm/trunk/include/llvm/CodeGen/SimpleRegisterCoalescing.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/SimpleRegisterCoalescing.h?rev=41482&r1=41481&r2=41482&view=diff ============================================================================== --- llvm/trunk/include/llvm/CodeGen/SimpleRegisterCoalescing.h (original) +++ llvm/trunk/include/llvm/CodeGen/SimpleRegisterCoalescing.h Mon Aug 27 09:50:10 2007 @@ -47,7 +47,7 @@ public: static char ID; // Pass identifcation, replacement for typeid - SimpleRegisterCoalescing() : MachineFunctionPass((intptr_t)&ID) {}; + SimpleRegisterCoalescing() : MachineFunctionPass((intptr_t)&ID) {} struct CopyRec { MachineInstr *MI; Modified: llvm/trunk/include/llvm/Support/FileUtilities.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/FileUtilities.h?rev=41482&r1=41481&r2=41482&view=diff ============================================================================== --- llvm/trunk/include/llvm/Support/FileUtilities.h (original) +++ llvm/trunk/include/llvm/Support/FileUtilities.h Mon Aug 27 09:50:10 2007 @@ -40,7 +40,7 @@ sys::Path Filename; bool DeleteIt; public: - FileRemover(const sys::Path &filename, bool deleteIt = true) + explicit FileRemover(const sys::Path &filename, bool deleteIt = true) : Filename(filename), DeleteIt(deleteIt) {} ~FileRemover() { Modified: llvm/trunk/include/llvm/Target/TargetELFWriterInfo.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetELFWriterInfo.h?rev=41482&r1=41481&r2=41482&view=diff ============================================================================== --- llvm/trunk/include/llvm/Target/TargetELFWriterInfo.h (original) +++ llvm/trunk/include/llvm/Target/TargetELFWriterInfo.h Mon Aug 27 09:50:10 2007 @@ -32,7 +32,7 @@ EM_386 = 3 }; - TargetELFWriterInfo(MachineType machine) : EMachine(machine) {} + explicit TargetELFWriterInfo(MachineType machine) : EMachine(machine) {} virtual ~TargetELFWriterInfo() {} unsigned short getEMachine() const { return EMachine; } Modified: llvm/trunk/include/llvm/Target/TargetLowering.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetLowering.h?rev=41482&r1=41481&r2=41482&view=diff ============================================================================== --- llvm/trunk/include/llvm/Target/TargetLowering.h (original) +++ llvm/trunk/include/llvm/Target/TargetLowering.h Mon Aug 27 09:50:10 2007 @@ -844,7 +844,7 @@ bool isByVal; ArgListEntry() : isSExt(false), isZExt(false), isInReg(false), - isSRet(false), isNest(false), isByVal(false) { }; + isSRet(false), isNest(false), isByVal(false) { } }; typedef std::vector<ArgListEntry> ArgListTy; virtual std::pair<SDOperand, SDOperand> Modified: llvm/trunk/lib/CodeGen/DwarfWriter.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/DwarfWriter.cpp?rev=41482&r1=41481&r2=41482&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/DwarfWriter.cpp (original) +++ llvm/trunk/lib/CodeGen/DwarfWriter.cpp Mon Aug 27 09:50:10 2007 @@ -221,7 +221,7 @@ std::vector<DIEValue *> Values; public: - DIE(unsigned Tag) + explicit DIE(unsigned Tag) : Abbrev(Tag, DW_CHILDREN_no) , Offset(0) , Size(0) @@ -304,7 +304,7 @@ /// unsigned Type; - DIEValue(unsigned T) + explicit DIEValue(unsigned T) : Type(T) {} virtual ~DIEValue() {} @@ -344,7 +344,7 @@ uint64_t Integer; public: - DIEInteger(uint64_t I) : DIEValue(isInteger), Integer(I) {} + explicit DIEInteger(uint64_t I) : DIEValue(isInteger), Integer(I) {} // Implement isa/cast/dyncast. static bool classof(const DIEInteger *) { return true; } @@ -396,7 +396,7 @@ public: const std::string String; - DIEString(const std::string &S) : DIEValue(isString), String(S) {} + explicit DIEString(const std::string &S) : DIEValue(isString), String(S) {} // Implement isa/cast/dyncast. static bool classof(const DIEString *) { return true; } @@ -435,7 +435,7 @@ const DWLabel Label; - DIEDwarfLabel(const DWLabel &L) : DIEValue(isLabel), Label(L) {} + explicit DIEDwarfLabel(const DWLabel &L) : DIEValue(isLabel), Label(L) {} // Implement isa/cast/dyncast. static bool classof(const DIEDwarfLabel *) { return true; } @@ -473,7 +473,8 @@ public: const std::string Label; - DIEObjectLabel(const std::string &L) : DIEValue(isAsIsLabel), Label(L) {} + explicit DIEObjectLabel(const std::string &L) + : DIEValue(isAsIsLabel), Label(L) {} // Implement isa/cast/dyncast. static bool classof(const DIEObjectLabel *) { return true; } @@ -553,7 +554,7 @@ public: DIE *Entry; - DIEntry(DIE *E) : DIEValue(isEntry), Entry(E) {} + explicit DIEntry(DIE *E) : DIEValue(isEntry), Entry(E) {} // Implement isa/cast/dyncast. static bool classof(const DIEntry *) { return true; } @@ -1117,7 +1118,7 @@ std::vector<MachineMove> Moves; FunctionDebugFrameInfo(unsigned Num, const std::vector<MachineMove> &M): - Number(Num), Moves(M) { }; + Number(Num), Moves(M) { } }; std::vector<FunctionDebugFrameInfo> DebugFrames; @@ -2745,7 +2746,7 @@ bool hC, bool hL, const std::vector<MachineMove> &M): FnName(FN), Number(Num), PersonalityIndex(P), - hasCalls(hC), hasLandingPads(hL), Moves(M) { }; + hasCalls(hC), hasLandingPads(hL), Moves(M) { } }; std::vector<FunctionEHFrameInfo> EHFrames; Modified: llvm/trunk/lib/CodeGen/PhysRegTracker.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/PhysRegTracker.h?rev=41482&r1=41481&r2=41482&view=diff ============================================================================== --- llvm/trunk/lib/CodeGen/PhysRegTracker.h (original) +++ llvm/trunk/lib/CodeGen/PhysRegTracker.h Mon Aug 27 09:50:10 2007 @@ -26,7 +26,7 @@ std::vector<unsigned> regUse_; public: - PhysRegTracker(const MRegisterInfo& mri) + explicit PhysRegTracker(const MRegisterInfo& mri) : mri_(&mri), regUse_(mri_->getNumRegs(), 0) { } _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits