From: Dan Gohman Date: Thu, 5 Jul 2007 20:40:15 +0000 (+0000) Subject: Add explicit keywords. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=27e9d457d4047cf0051e17d9ca39740875d11440;p=oota-llvm.git Add explicit keywords. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37925 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/CodeGen/IntrinsicLowering.h b/include/llvm/CodeGen/IntrinsicLowering.h index 098d59c1c1d..bff1b396cd0 100644 --- a/include/llvm/CodeGen/IntrinsicLowering.h +++ b/include/llvm/CodeGen/IntrinsicLowering.h @@ -26,7 +26,7 @@ namespace llvm { class IntrinsicLowering { const TargetData& TD; public: - IntrinsicLowering(const TargetData &td) : TD(td) {} + explicit IntrinsicLowering(const TargetData &td) : TD(td) {} /// AddPrototypes - This method, if called, causes all of the prototypes /// that might be needed by an intrinsic lowering implementation to be diff --git a/include/llvm/CodeGen/MachineModuleInfo.h b/include/llvm/CodeGen/MachineModuleInfo.h index 457d33d1f26..1f9decf574c 100644 --- a/include/llvm/CodeGen/MachineModuleInfo.h +++ b/include/llvm/CodeGen/MachineModuleInfo.h @@ -97,7 +97,7 @@ private: // Dwarf writers. protected: - DebugInfoDesc(unsigned T) : Tag(T | LLVMDebugVersion) {} + explicit DebugInfoDesc(unsigned T) : Tag(T | LLVMDebugVersion) {} public: virtual ~DebugInfoDesc() {} diff --git a/include/llvm/CodeGen/RegisterScavenging.h b/include/llvm/CodeGen/RegisterScavenging.h index 01db6a231ed..ec23e760fa2 100644 --- a/include/llvm/CodeGen/RegisterScavenging.h +++ b/include/llvm/CodeGen/RegisterScavenging.h @@ -57,7 +57,7 @@ public: : MBB(NULL), NumPhysRegs(0), Tracking(false), ScavengingFrameIndex(-1), ScavengedReg(0), ScavengedRC(NULL) {}; - RegScavenger(MachineBasicBlock *mbb) + explicit RegScavenger(MachineBasicBlock *mbb) : MBB(mbb), NumPhysRegs(0), Tracking(false), ScavengingFrameIndex(-1), ScavengedReg(0), ScavengedRC(NULL) {}; diff --git a/include/llvm/Support/CommandLine.h b/include/llvm/Support/CommandLine.h index 08aca8160ac..23b7cf380e7 100644 --- a/include/llvm/Support/CommandLine.h +++ b/include/llvm/Support/CommandLine.h @@ -202,7 +202,7 @@ public: void setMiscFlag(enum MiscFlags M) { setFlag(M, M); } void setPosition(unsigned pos) { Position = pos; } protected: - Option(unsigned DefaultFlags) + explicit Option(unsigned DefaultFlags) : NumOccurrences(0), Flags(DefaultFlags | NormalFormatting), Position(0), NextRegistered(0), ArgStr(""), HelpStr(""), ValueStr("") { assert(getNumOccurrencesFlag() != 0 &&