diff options
author | Dan Gohman <gohman@apple.com> | 2007-10-08 15:08:41 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2007-10-08 15:08:41 +0000 |
commit | cdf2b3b2f88d6f961b664e3f67a8ee37b46b0d27 (patch) | |
tree | 4734759131091672970dd5592c47d2f64ad585d4 /include | |
parent | 5477f8593db785bbe84a4fe923b1e5645ff15f6a (diff) | |
download | llvm-cdf2b3b2f88d6f961b664e3f67a8ee37b46b0d27.tar.gz llvm-cdf2b3b2f88d6f961b664e3f67a8ee37b46b0d27.tar.bz2 llvm-cdf2b3b2f88d6f961b664e3f67a8ee37b46b0d27.tar.xz |
Add explicit keywords.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@42747 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Bitcode/Archive.h | 4 | ||||
-rw-r--r-- | include/llvm/Bitcode/BitCodes.h | 4 | ||||
-rw-r--r-- | include/llvm/Bitcode/BitstreamWriter.h | 2 | ||||
-rw-r--r-- | include/llvm/Support/CommandLine.h | 10 | ||||
-rw-r--r-- | include/llvm/Target/SubtargetFeature.h | 2 |
5 files changed, 11 insertions, 11 deletions
diff --git a/include/llvm/Bitcode/Archive.h b/include/llvm/Bitcode/Archive.h index 39ad5eb63a..6ddf4a4aca 100644 --- a/include/llvm/Bitcode/Archive.h +++ b/include/llvm/Bitcode/Archive.h @@ -198,7 +198,7 @@ class ArchiveMember { private: /// Used internally by the Archive class to construct an ArchiveMember. /// The contents of the ArchiveMember are filled out by the Archive class. - ArchiveMember(Archive *PAR); + explicit ArchiveMember(Archive *PAR); // So Archive can construct an ArchiveMember friend class llvm::Archive; @@ -461,7 +461,7 @@ class Archive { protected: /// @brief Construct an Archive for \p filename and optionally map it /// into memory. - Archive(const sys::Path& filename); + explicit Archive(const sys::Path& filename); /// @param data The symbol table data to be parsed /// @param len The length of the symbol table data diff --git a/include/llvm/Bitcode/BitCodes.h b/include/llvm/Bitcode/BitCodes.h index 59d57e77f2..a959ef2229 100644 --- a/include/llvm/Bitcode/BitCodes.h +++ b/include/llvm/Bitcode/BitCodes.h @@ -91,8 +91,8 @@ public: Char6 = 4 // A 6-bit fixed field which maps to [a-zA-Z0-9._]. }; - BitCodeAbbrevOp(uint64_t V) : Val(V), IsLiteral(true) {} - BitCodeAbbrevOp(Encoding E, uint64_t Data = 0) + explicit BitCodeAbbrevOp(uint64_t V) : Val(V), IsLiteral(true) {} + explicit BitCodeAbbrevOp(Encoding E, uint64_t Data = 0) : Val(Data), IsLiteral(false), Enc(E) {} bool isLiteral() const { return IsLiteral; } diff --git a/include/llvm/Bitcode/BitstreamWriter.h b/include/llvm/Bitcode/BitstreamWriter.h index 64598edbd5..ef7d7e7ef4 100644 --- a/include/llvm/Bitcode/BitstreamWriter.h +++ b/include/llvm/Bitcode/BitstreamWriter.h @@ -59,7 +59,7 @@ class BitstreamWriter { std::vector<BlockInfo> BlockInfoRecords; public: - BitstreamWriter(std::vector<unsigned char> &O) + explicit BitstreamWriter(std::vector<unsigned char> &O) : Out(O), CurBit(0), CurValue(0), CurCodeSize(2) {} ~BitstreamWriter() { diff --git a/include/llvm/Support/CommandLine.h b/include/llvm/Support/CommandLine.h index 23b7cf380e..562ba04aa5 100644 --- a/include/llvm/Support/CommandLine.h +++ b/include/llvm/Support/CommandLine.h @@ -838,7 +838,7 @@ public: // One option... template<class M0t> - opt(const M0t &M0) : Option(Optional | NotHidden) { + explicit opt(const M0t &M0) : Option(Optional | NotHidden) { apply(M0, this); done(); } @@ -998,7 +998,7 @@ public: // One option... template<class M0t> - list(const M0t &M0) : Option(ZeroOrMore | NotHidden) { + explicit list(const M0t &M0) : Option(ZeroOrMore | NotHidden) { apply(M0, this); done(); } @@ -1184,7 +1184,7 @@ public: // One option... template<class M0t> - bits(const M0t &M0) : Option(ZeroOrMore | NotHidden) { + explicit bits(const M0t &M0) : Option(ZeroOrMore | NotHidden) { apply(M0, this); done(); } @@ -1277,7 +1277,7 @@ public: // One option... template<class M0t> - alias(const M0t &M0) : Option(Optional | Hidden), AliasFor(0) { + explicit alias(const M0t &M0) : Option(Optional | Hidden), AliasFor(0) { apply(M0, this); done(); } @@ -1306,7 +1306,7 @@ public: // aliasfor - Modifier to set the option an alias aliases. struct aliasopt { Option &Opt; - aliasopt(Option &O) : Opt(O) {} + explicit aliasopt(Option &O) : Opt(O) {} void apply(alias &A) const { A.setAliasFor(Opt); } }; diff --git a/include/llvm/Target/SubtargetFeature.h b/include/llvm/Target/SubtargetFeature.h index e809fc0a2c..b0bb94193a 100644 --- a/include/llvm/Target/SubtargetFeature.h +++ b/include/llvm/Target/SubtargetFeature.h @@ -73,7 +73,7 @@ struct SubtargetInfoKV { class SubtargetFeatures { std::vector<std::string> Features; // Subtarget features as a vector public: - SubtargetFeatures(const std::string &Initial = std::string()); + explicit SubtargetFeatures(const std::string &Initial = std::string()); /// Features string accessors. std::string getString() const; |