From 9ba5d4d7fcdb4f9326645c18535a82d80fea8e49 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Mon, 27 Aug 2007 14:50:10 +0000 Subject: Add explicit keywords and remove spurious trailing semicolons. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41482 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/ADT/FoldingSet.h | 4 ++-- include/llvm/CodeGen/LiveInterval.h | 4 ++-- include/llvm/CodeGen/MachineConstantPool.h | 2 +- include/llvm/CodeGen/MachineFunction.h | 2 +- include/llvm/CodeGen/RegisterScavenging.h | 4 ++-- include/llvm/CodeGen/SelectionDAGISel.h | 8 ++++---- include/llvm/CodeGen/SimpleRegisterCoalescing.h | 2 +- include/llvm/Support/FileUtilities.h | 2 +- include/llvm/Target/TargetELFWriterInfo.h | 2 +- include/llvm/Target/TargetLowering.h | 2 +- 10 files changed, 16 insertions(+), 16 deletions(-) (limited to 'include') diff --git a/include/llvm/ADT/FoldingSet.h b/include/llvm/ADT/FoldingSet.h index e6ded76..d88a814 100644 --- a/include/llvm/ADT/FoldingSet.h +++ b/include/llvm/ADT/FoldingSet.h @@ -119,7 +119,7 @@ private: unsigned NumNodes; public: - FoldingSetImpl(unsigned Log2InitSize = 6); + explicit FoldingSetImpl(unsigned Log2InitSize = 6); virtual ~FoldingSetImpl(); // Forward declaration. @@ -232,7 +232,7 @@ private: } public: - FoldingSet(unsigned Log2InitSize = 6) + explicit FoldingSet(unsigned Log2InitSize = 6) : FoldingSetImpl(Log2InitSize) {} diff --git a/include/llvm/CodeGen/LiveInterval.h b/include/llvm/CodeGen/LiveInterval.h index 99933ea..281e3af 100644 --- a/include/llvm/CodeGen/LiveInterval.h +++ b/include/llvm/CodeGen/LiveInterval.h @@ -96,8 +96,8 @@ namespace llvm { unsigned def; unsigned reg; SmallVector 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 ValueNumberInfo; diff --git a/include/llvm/CodeGen/MachineConstantPool.h b/include/llvm/CodeGen/MachineConstantPool.h index ec00fc1..f05a540 100644 --- a/include/llvm/CodeGen/MachineConstantPool.h +++ b/include/llvm/CodeGen/MachineConstantPool.h @@ -36,7 +36,7 @@ class MachineConstantPoolValue { public: explicit MachineConstantPoolValue(const Type *ty) : Ty(ty) {} - virtual ~MachineConstantPoolValue() {}; + virtual ~MachineConstantPoolValue() {} /// getType - get type of this MachineConstantPoolValue. /// diff --git a/include/llvm/CodeGen/MachineFunction.h b/include/llvm/CodeGen/MachineFunction.h index 00a1fe8..3c79b94 100644 --- a/include/llvm/CodeGen/MachineFunction.h +++ b/include/llvm/CodeGen/MachineFunction.h @@ -73,7 +73,7 @@ public: /// 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 { diff --git a/include/llvm/CodeGen/RegisterScavenging.h b/include/llvm/CodeGen/RegisterScavenging.h index ec23e76..aba57dc 100644 --- a/include/llvm/CodeGen/RegisterScavenging.h +++ b/include/llvm/CodeGen/RegisterScavenging.h @@ -55,11 +55,11 @@ class RegScavenger { 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. diff --git a/include/llvm/CodeGen/SelectionDAGISel.h b/include/llvm/CodeGen/SelectionDAGISel.h index 047da7c..de75485 100644 --- a/include/llvm/CodeGen/SelectionDAGISel.h +++ b/include/llvm/CodeGen/SelectionDAGISel.h @@ -104,7 +104,7 @@ public: }; 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 @@ public: 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 @@ public: 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 @@ public: 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; diff --git a/include/llvm/CodeGen/SimpleRegisterCoalescing.h b/include/llvm/CodeGen/SimpleRegisterCoalescing.h index 20bcb89..892ab48 100644 --- a/include/llvm/CodeGen/SimpleRegisterCoalescing.h +++ b/include/llvm/CodeGen/SimpleRegisterCoalescing.h @@ -47,7 +47,7 @@ namespace llvm { public: static char ID; // Pass identifcation, replacement for typeid - SimpleRegisterCoalescing() : MachineFunctionPass((intptr_t)&ID) {}; + SimpleRegisterCoalescing() : MachineFunctionPass((intptr_t)&ID) {} struct CopyRec { MachineInstr *MI; diff --git a/include/llvm/Support/FileUtilities.h b/include/llvm/Support/FileUtilities.h index 9cebe23..950516d 100644 --- a/include/llvm/Support/FileUtilities.h +++ b/include/llvm/Support/FileUtilities.h @@ -40,7 +40,7 @@ namespace llvm { 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() { diff --git a/include/llvm/Target/TargetELFWriterInfo.h b/include/llvm/Target/TargetELFWriterInfo.h index a8332df..ba44f4a 100644 --- a/include/llvm/Target/TargetELFWriterInfo.h +++ b/include/llvm/Target/TargetELFWriterInfo.h @@ -32,7 +32,7 @@ namespace llvm { EM_386 = 3 }; - TargetELFWriterInfo(MachineType machine) : EMachine(machine) {} + explicit TargetELFWriterInfo(MachineType machine) : EMachine(machine) {} virtual ~TargetELFWriterInfo() {} unsigned short getEMachine() const { return EMachine; } diff --git a/include/llvm/Target/TargetLowering.h b/include/llvm/Target/TargetLowering.h index f566038..ed97a93 100644 --- a/include/llvm/Target/TargetLowering.h +++ b/include/llvm/Target/TargetLowering.h @@ -844,7 +844,7 @@ public: bool isByVal; ArgListEntry() : isSExt(false), isZExt(false), isInReg(false), - isSRet(false), isNest(false), isByVal(false) { }; + isSRet(false), isNest(false), isByVal(false) { } }; typedef std::vector ArgListTy; virtual std::pair -- cgit v1.1