Author: djg Date: Mon Oct 8 10:08:41 2007 New Revision: 42747 URL: http://llvm.org/viewvc/llvm-project?rev=42747&view=rev Log: Add explicit keywords.
Modified: llvm/trunk/include/llvm/Bitcode/Archive.h llvm/trunk/include/llvm/Bitcode/BitCodes.h llvm/trunk/include/llvm/Bitcode/BitstreamWriter.h llvm/trunk/include/llvm/Support/CommandLine.h llvm/trunk/include/llvm/Target/SubtargetFeature.h llvm/trunk/lib/VMCore/PassManager.cpp Modified: llvm/trunk/include/llvm/Bitcode/Archive.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Bitcode/Archive.h?rev=42747&r1=42746&r2=42747&view=diff ============================================================================== --- llvm/trunk/include/llvm/Bitcode/Archive.h (original) +++ llvm/trunk/include/llvm/Bitcode/Archive.h Mon Oct 8 10:08:41 2007 @@ -198,7 +198,7 @@ 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 @@ 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 Modified: llvm/trunk/include/llvm/Bitcode/BitCodes.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Bitcode/BitCodes.h?rev=42747&r1=42746&r2=42747&view=diff ============================================================================== --- llvm/trunk/include/llvm/Bitcode/BitCodes.h (original) +++ llvm/trunk/include/llvm/Bitcode/BitCodes.h Mon Oct 8 10:08:41 2007 @@ -91,8 +91,8 @@ 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; } Modified: llvm/trunk/include/llvm/Bitcode/BitstreamWriter.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Bitcode/BitstreamWriter.h?rev=42747&r1=42746&r2=42747&view=diff ============================================================================== --- llvm/trunk/include/llvm/Bitcode/BitstreamWriter.h (original) +++ llvm/trunk/include/llvm/Bitcode/BitstreamWriter.h Mon Oct 8 10:08:41 2007 @@ -59,7 +59,7 @@ 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() { Modified: llvm/trunk/include/llvm/Support/CommandLine.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/CommandLine.h?rev=42747&r1=42746&r2=42747&view=diff ============================================================================== --- llvm/trunk/include/llvm/Support/CommandLine.h (original) +++ llvm/trunk/include/llvm/Support/CommandLine.h Mon Oct 8 10:08:41 2007 @@ -838,7 +838,7 @@ // 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 @@ // 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 @@ // 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 @@ // 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 @@ // 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); } }; Modified: llvm/trunk/include/llvm/Target/SubtargetFeature.h URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/SubtargetFeature.h?rev=42747&r1=42746&r2=42747&view=diff ============================================================================== --- llvm/trunk/include/llvm/Target/SubtargetFeature.h (original) +++ llvm/trunk/include/llvm/Target/SubtargetFeature.h Mon Oct 8 10:08:41 2007 @@ -73,7 +73,7 @@ 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; Modified: llvm/trunk/lib/VMCore/PassManager.cpp URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/PassManager.cpp?rev=42747&r1=42746&r2=42747&view=diff ============================================================================== --- llvm/trunk/lib/VMCore/PassManager.cpp (original) +++ llvm/trunk/lib/VMCore/PassManager.cpp Mon Oct 8 10:08:41 2007 @@ -65,7 +65,7 @@ public: static char ID; - BBPassManager(int Depth) + explicit BBPassManager(int Depth) : PMDataManager(Depth), FunctionPass((intptr_t)&ID) {} /// Execute all of the passes scheduled for execution. Keep track of @@ -121,7 +121,7 @@ public PMTopLevelManager { public: static char ID; - FunctionPassManagerImpl(int Depth) : + explicit FunctionPassManagerImpl(int Depth) : Pass((intptr_t)&ID), PMDataManager(Depth), PMTopLevelManager(TLM_Function) { } @@ -185,7 +185,8 @@ public: static char ID; - MPPassManager(int Depth) : Pass((intptr_t)&ID), PMDataManager(Depth) { } + explicit MPPassManager(int Depth) : + Pass((intptr_t)&ID), PMDataManager(Depth) { } // Delete on the fly managers. virtual ~MPPassManager() { @@ -260,8 +261,9 @@ public: static char ID; - PassManagerImpl(int Depth) : Pass((intptr_t)&ID), PMDataManager(Depth), - PMTopLevelManager(TLM_Pass) { } + explicit PassManagerImpl(int Depth) : + Pass((intptr_t)&ID), PMDataManager(Depth), + PMTopLevelManager(TLM_Pass) { } /// add - Add a pass to the queue of passes to run. This passes ownership of /// the Pass to the PassManager. When the PassManager is destroyed, the pass _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits