Add explicit keywords and remove spurious trailing semicolons.
authorDan Gohman <gohman@apple.com>
Mon, 27 Aug 2007 14:50:10 +0000 (14:50 +0000)
committerDan Gohman <gohman@apple.com>
Mon, 27 Aug 2007 14:50:10 +0000 (14:50 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41482 91177308-0d34-0410-b5e6-96231b3b80d8

12 files changed:
include/llvm/ADT/FoldingSet.h
include/llvm/CodeGen/LiveInterval.h
include/llvm/CodeGen/MachineConstantPool.h
include/llvm/CodeGen/MachineFunction.h
include/llvm/CodeGen/RegisterScavenging.h
include/llvm/CodeGen/SelectionDAGISel.h
include/llvm/CodeGen/SimpleRegisterCoalescing.h
include/llvm/Support/FileUtilities.h
include/llvm/Target/TargetELFWriterInfo.h
include/llvm/Target/TargetLowering.h
lib/CodeGen/DwarfWriter.cpp
lib/CodeGen/PhysRegTracker.h

index e6ded76f260d2e404a74b5ac19075a096af9249b..d88a814242c58ac13de62fc714f7b05e157b77ee 100644 (file)
@@ -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)
   {}
 
index 99933eaa9506bc516b25ab257d1bb9a8c26537c4..281e3af96c217da5962893561abf552bd460d3f0 100644 (file)
@@ -96,8 +96,8 @@ namespace llvm {
       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;
index ec00fc115d1d10c1ec5082dc9a5fd61e3cbc11d5..f05a540d38e5b992a1ea9a009929c7a62098cdf7 100644 (file)
@@ -36,7 +36,7 @@ class MachineConstantPoolValue {
 
 public:
   explicit MachineConstantPoolValue(const Type *ty) : Ty(ty) {}
-  virtual ~MachineConstantPoolValue() {};
+  virtual ~MachineConstantPoolValue() {}
 
   /// getType - get type of this MachineConstantPoolValue.
   ///
index 00a1fe884071e735ee5f8e6ab5dd8625a07bca95..3c79b944f50de29a85f8faabd0ac7cbd8f50e65e 100644 (file)
@@ -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 {
index ec23e760fa2c6a7ceb62486cdf6893c6e7f7fcd5..aba57dc5fc4f0ffa4552d22963e4d34d917f570b 100644 (file)
@@ -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.
index 047da7c92d94e2235ed4c2a7c8debc1648cf8973..de7548596eaf055fe6ea7093998117963af8db2c 100644 (file)
@@ -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;
index 20bcb89d9a8ab6bee5b22604345510db30924a6b..892ab4873a6cca16e98b27248818af4169fa5bd1 100644 (file)
@@ -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;
index 9cebe23862379f1f63ffcd1e13df0ed45ef2370e..950516d1a4219bf47984cd4d0edafc32a93c6ec6 100644 (file)
@@ -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() {
index a8332dfd8d27aec18aa244ffa4d95f149ffe59d1..ba44f4adba84c72c796f22a13163644d69884ed8 100644 (file)
@@ -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; }
index f566038e4c4f807e0be4f175329ac78fba64e45f..ed97a93b44ba8964c8d884113d0c8ea5fd7e8c2f 100644 (file)
@@ -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<ArgListEntry> ArgListTy;
   virtual std::pair<SDOperand, SDOperand>
index 19aa6c3b9309b43168d51b4a1423dd1c78b3268c..959170bd0c0079c2aad8c53b10a61c6d3de751cc 100644 (file)
@@ -221,7 +221,7 @@ protected:
   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 @@ public:
   ///
   unsigned Type;
   
-  DIEValue(unsigned T)
+  explicit DIEValue(unsigned T)
   : Type(T)
   {}
   virtual ~DIEValue() {}
@@ -344,7 +344,7 @@ private:
   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 @@ class DIEString : public DIEValue {
 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 @@ public:
 
   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 @@ class DIEObjectLabel : public DIEValue {
 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 @@ class DIEntry : public DIEValue {
 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 @@ private:
     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 @@ private:
                         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;
index f5a240231cf2bb910f5c3818f8efdb1848bb5f37..2717e337687a81bbd9eb4ede75b60bbddcc44219 100644 (file)
@@ -26,7 +26,7 @@ namespace llvm {
         std::vector<unsigned> regUse_;
 
     public:
-        PhysRegTracker(const MRegisterInfo& mri)
+        explicit PhysRegTracker(const MRegisterInfo& mri)
             : mri_(&mri),
               regUse_(mri_->getNumRegs(), 0) {
         }