Add explicit keywords.
authorDan Gohman <gohman@apple.com>
Wed, 18 Feb 2009 16:37:45 +0000 (16:37 +0000)
committerDan Gohman <gohman@apple.com>
Wed, 18 Feb 2009 16:37:45 +0000 (16:37 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64915 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/ADT/SmallVector.h
lib/Target/Sparc/FPMover.cpp
lib/Transforms/IPO/ArgumentPromotion.cpp
utils/TableGen/AsmWriterEmitter.cpp
utils/TableGen/DAGISelEmitter.h

index 8a2e17b01e4771adae438feff1242af5fbab2402..c981d5756b3af2aa8f882f32bd3d79e30fc87b29 100644 (file)
@@ -75,7 +75,7 @@ protected:
   // Space after 'FirstEl' is clobbered, do not add any instance vars after it.
 public:
   // Default ctor - Initialize to empty.
-  SmallVectorImpl(unsigned N)
+  explicit SmallVectorImpl(unsigned N)
     : Begin(reinterpret_cast<T*>(&FirstEl)),
       End(reinterpret_cast<T*>(&FirstEl)),
       Capacity(reinterpret_cast<T*>(&FirstEl)+N) {
index 5faf2a1a7635644bd6791bfbf366dd7f5ddddda6..f72a4c4645c15c89dfb957c69fc632c91076aed6 100644 (file)
@@ -33,7 +33,7 @@ namespace {
     TargetMachine &TM;
     
     static char ID;
-    FPMover(TargetMachine &tm) 
+    explicit FPMover(TargetMachine &tm) 
       : MachineFunctionPass(&ID), TM(tm) { }
 
     virtual const char *getPassName() const {
index 183e1a1e0a4cca6e9bdf7e430d3b3161737008a2..b562c425aa6c4b118e32617cf12510c99fe79a0a 100644 (file)
@@ -66,8 +66,8 @@ namespace {
 
     virtual bool runOnSCC(const std::vector<CallGraphNode *> &SCC);
     static char ID; // Pass identification, replacement for typeid
-    ArgPromotion(unsigned maxElements = 3) : CallGraphSCCPass(&ID),
-                                             maxElements(maxElements) {}
+    explicit ArgPromotion(unsigned maxElements = 3)
+      : CallGraphSCCPass(&ID), maxElements(maxElements) {}
 
     /// A vector used to hold the indices of a single GEP instruction
     typedef std::vector<uint64_t> IndicesVector;
index e2cd5dc031013edc3a7de5559e85f6cd00872606..93d67e843bbd5aeed7d1902254743223a12c12b3 100644 (file)
@@ -48,7 +48,7 @@ namespace llvm {
     // To make VS STL happy
     AsmWriterOperand():OperandType(isLiteralTextOperand) {}
 
-    AsmWriterOperand(const std::string &LitStr)
+    explicit AsmWriterOperand(const std::string &LitStr)
       : OperandType(isLiteralTextOperand), Str(LitStr) {}
 
     AsmWriterOperand(const std::string &Printer, unsigned OpNo, 
index 2f626f6b866bd446e64fc6add07bab70dce7452f..1b9f8bad88cd5b38f44010520ddd1f33cc2cb40a 100644 (file)
@@ -27,7 +27,7 @@ class DAGISelEmitter : public TableGenBackend {
   RecordKeeper &Records;
   CodeGenDAGPatterns CGP;
 public:
-  DAGISelEmitter(RecordKeeper &R) : Records(R), CGP(R) {}
+  explicit DAGISelEmitter(RecordKeeper &R) : Records(R), CGP(R) {}
 
   // run - Output the isel, returning true on failure.
   void run(std::ostream &OS);