[llvm-commits] CVS: llvm/include/llvm/Pass.h

Dan Gohman djg at cray.com
Fri May 11 14:05:06 PDT 2007



Changes in directory llvm/include/llvm:

Pass.h updated: 1.90 -> 1.91
---
Log message:

Add explicit keywords to several constructors that now have one argument.


---
Diffs of the changes:  (+5 -5)

 Pass.h |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)


Index: llvm/include/llvm/Pass.h
diff -u llvm/include/llvm/Pass.h:1.90 llvm/include/llvm/Pass.h:1.91
--- llvm/include/llvm/Pass.h:1.90	Thu May  3 17:09:21 2007
+++ llvm/include/llvm/Pass.h	Fri May 11 16:04:48 2007
@@ -86,7 +86,7 @@
   void operator=(const Pass&);  // DO NOT IMPLEMENT
   Pass(const Pass &);           // DO NOT IMPLEMENT
 public:
-  Pass(intptr_t pid) : Resolver(0), PassID(pid) {}
+  explicit Pass(intptr_t pid) : Resolver(0), PassID(pid) {}
   virtual ~Pass();
 
   /// getPassName - Return a nice clean name for a pass.  This usually
@@ -231,7 +231,7 @@
     return PMT_ModulePassManager;
   }
 
-  ModulePass(intptr_t pid) : Pass(pid) {}
+  explicit ModulePass(intptr_t pid) : Pass(pid) {}
   // Force out-of-line virtual method.
   virtual ~ModulePass();
 };
@@ -256,7 +256,7 @@
   ///
   virtual bool runOnModule(Module &M) { return false; }
 
-  ImmutablePass(intptr_t pid) : ModulePass(pid) {}
+  explicit ImmutablePass(intptr_t pid) : ModulePass(pid) {}
   // Force out-of-line virtual method.
   virtual ~ImmutablePass();
 };
@@ -272,7 +272,7 @@
 ///
 class FunctionPass : public Pass {
 public:
-  FunctionPass(intptr_t pid) : Pass(pid) {}
+  explicit FunctionPass(intptr_t pid) : Pass(pid) {}
 
   /// doInitialization - Virtual method overridden by subclasses to do
   /// any necessary per-module initialization.
@@ -323,7 +323,7 @@
 ///
 class BasicBlockPass : public Pass {
 public:
-  BasicBlockPass(intptr_t pid) : Pass(pid) {}
+  explicit BasicBlockPass(intptr_t pid) : Pass(pid) {}
 
   /// doInitialization - Virtual method overridden by subclasses to do
   /// any necessary per-module initialization.






More information about the llvm-commits mailing list