Add explicit keywords.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37839 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/llvm/Analysis/LoopPass.h b/include/llvm/Analysis/LoopPass.h
index 7a820cc..08c2bcb 100644
--- a/include/llvm/Analysis/LoopPass.h
+++ b/include/llvm/Analysis/LoopPass.h
@@ -29,9 +29,9 @@
class LoopPass : public Pass {
public:
- LoopPass(intptr_t pid) : Pass(pid) {}
+ explicit LoopPass(intptr_t pid) : Pass(pid) {}
- // runOnLoop - THis method should be implemented by the subclass to perform
+ // runOnLoop - This method should be implemented by the subclass to perform
// whatever action is necessary for the specfied Loop.
virtual bool runOnLoop (Loop *L, LPPassManager &LPM) = 0;
virtual bool runOnFunctionBody (Function &F, LPPassManager &LPM) {
diff --git a/include/llvm/CallGraphSCCPass.h b/include/llvm/CallGraphSCCPass.h
index 90894c2..2bc163d 100644
--- a/include/llvm/CallGraphSCCPass.h
+++ b/include/llvm/CallGraphSCCPass.h
@@ -31,7 +31,7 @@
struct CallGraphSCCPass : public Pass {
- CallGraphSCCPass(intptr_t pid) : Pass(pid) {}
+ explicit CallGraphSCCPass(intptr_t pid) : Pass(pid) {}
/// doInitialization - This method is called before the SCC's of the program
/// has been processed, allowing the pass to do initialization as necessary.
diff --git a/include/llvm/CodeGen/MachineFunctionPass.h b/include/llvm/CodeGen/MachineFunctionPass.h
index 7429e7b..9a8d29b 100644
--- a/include/llvm/CodeGen/MachineFunctionPass.h
+++ b/include/llvm/CodeGen/MachineFunctionPass.h
@@ -26,7 +26,7 @@
struct MachineFunctionPass : public FunctionPass {
- MachineFunctionPass(intptr_t ID) : FunctionPass(ID) {}
+ explicit MachineFunctionPass(intptr_t ID) : FunctionPass(ID) {}
/// runOnMachineFunction - This method must be overloaded to perform the
/// desired machine code transformation or analysis.
diff --git a/lib/Analysis/BasicAliasAnalysis.cpp b/lib/Analysis/BasicAliasAnalysis.cpp
index 762fef1..b6072fd 100644
--- a/lib/Analysis/BasicAliasAnalysis.cpp
+++ b/lib/Analysis/BasicAliasAnalysis.cpp
@@ -38,7 +38,7 @@
struct VISIBILITY_HIDDEN NoAA : public ImmutablePass, public AliasAnalysis {
static char ID; // Class identification, replacement for typeinfo
NoAA() : ImmutablePass((intptr_t)&ID) {}
- NoAA(intptr_t PID) : ImmutablePass(PID) { }
+ explicit NoAA(intptr_t PID) : ImmutablePass(PID) { }
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
AU.addRequired<TargetData>();
diff --git a/lib/Analysis/CFGPrinter.cpp b/lib/Analysis/CFGPrinter.cpp
index 7466666..d32481e 100644
--- a/lib/Analysis/CFGPrinter.cpp
+++ b/lib/Analysis/CFGPrinter.cpp
@@ -135,7 +135,7 @@
struct VISIBILITY_HIDDEN CFGPrinter : public FunctionPass {
static char ID; // Pass identification, replacement for typeid
CFGPrinter() : FunctionPass((intptr_t)&ID) {}
- CFGPrinter(intptr_t pid) : FunctionPass(pid) {}
+ explicit CFGPrinter(intptr_t pid) : FunctionPass(pid) {}
virtual bool runOnFunction(Function &F) {
std::string Filename = "cfg." + F.getName() + ".dot";