diff options
author | Dan Gohman <gohman@apple.com> | 2009-02-18 16:37:45 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-02-18 16:37:45 +0000 |
commit | 38deef9ce58b33dba34515f23fb7dbde02164c77 (patch) | |
tree | 572289f6ed7b7d2bb931e5edd9816d2e723fc787 | |
parent | d6b7a242d345fd79a337afd384bb586c5619cfe7 (diff) | |
download | external_llvm-38deef9ce58b33dba34515f23fb7dbde02164c77.zip external_llvm-38deef9ce58b33dba34515f23fb7dbde02164c77.tar.gz external_llvm-38deef9ce58b33dba34515f23fb7dbde02164c77.tar.bz2 |
Add explicit keywords.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64915 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/ADT/SmallVector.h | 2 | ||||
-rw-r--r-- | lib/Target/Sparc/FPMover.cpp | 2 | ||||
-rw-r--r-- | lib/Transforms/IPO/ArgumentPromotion.cpp | 4 | ||||
-rw-r--r-- | utils/TableGen/AsmWriterEmitter.cpp | 2 | ||||
-rw-r--r-- | utils/TableGen/DAGISelEmitter.h | 2 |
5 files changed, 6 insertions, 6 deletions
diff --git a/include/llvm/ADT/SmallVector.h b/include/llvm/ADT/SmallVector.h index 8a2e17b..c981d57 100644 --- a/include/llvm/ADT/SmallVector.h +++ b/include/llvm/ADT/SmallVector.h @@ -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) { diff --git a/lib/Target/Sparc/FPMover.cpp b/lib/Target/Sparc/FPMover.cpp index 5faf2a1..f72a4c4 100644 --- a/lib/Target/Sparc/FPMover.cpp +++ b/lib/Target/Sparc/FPMover.cpp @@ -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 { diff --git a/lib/Transforms/IPO/ArgumentPromotion.cpp b/lib/Transforms/IPO/ArgumentPromotion.cpp index 183e1a1..b562c42 100644 --- a/lib/Transforms/IPO/ArgumentPromotion.cpp +++ b/lib/Transforms/IPO/ArgumentPromotion.cpp @@ -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; diff --git a/utils/TableGen/AsmWriterEmitter.cpp b/utils/TableGen/AsmWriterEmitter.cpp index e2cd5dc..93d67e8 100644 --- a/utils/TableGen/AsmWriterEmitter.cpp +++ b/utils/TableGen/AsmWriterEmitter.cpp @@ -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, diff --git a/utils/TableGen/DAGISelEmitter.h b/utils/TableGen/DAGISelEmitter.h index 2f626f6..1b9f8ba 100644 --- a/utils/TableGen/DAGISelEmitter.h +++ b/utils/TableGen/DAGISelEmitter.h @@ -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); |