Add explicit keywords.
authorDan Gohman <gohman@apple.com>
Tue, 29 Jan 2008 11:36:12 +0000 (11:36 +0000)
committerDan Gohman <gohman@apple.com>
Tue, 29 Jan 2008 11:36:12 +0000 (11:36 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@46506 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/MachineOperand.h
include/llvm/CodeGen/MachineRegisterInfo.h
include/llvm/PassSupport.h
lib/VMCore/AsmWriter.cpp

index a782ff538ca90a2923bea401b6d41fe417b03ab9..7fb2b9e7674d59e2b7f48c674258d5b6744ffa92 100644 (file)
@@ -97,7 +97,7 @@ private:
     } OffsetedInfo;
   } Contents;
   
-  MachineOperand(MachineOperandType K) : OpKind(K), ParentMI(0) {}
+  explicit MachineOperand(MachineOperandType K) : OpKind(K), ParentMI(0) {}
 public:
   MachineOperand(const MachineOperand &M) {
     *this = M;
index 47ffbfbab7ce4743c6954d64e49217760e3f590a..2a62a83130c7c4ed75fedc6de4def4d504512328 100644 (file)
@@ -54,7 +54,7 @@ class MachineRegisterInfo {
   MachineRegisterInfo(const MachineRegisterInfo&); // DO NOT IMPLEMENT
   void operator=(const MachineRegisterInfo&);      // DO NOT IMPLEMENT
 public:
-  MachineRegisterInfo(const MRegisterInfo &MRI);
+  explicit MachineRegisterInfo(const MRegisterInfo &MRI);
   ~MachineRegisterInfo();
   
   //===--------------------------------------------------------------------===//
@@ -203,7 +203,7 @@ public:
   class defusechain_iterator
     : public forward_iterator<MachineInstr, ptrdiff_t> {
     MachineOperand *Op;
-    defusechain_iterator(MachineOperand *op) : Op(op) {
+    explicit defusechain_iterator(MachineOperand *op) : Op(op) {
       // If the first node isn't one we're interested in, advance to one that
       // we are interested in.
       if (op) {
index 9e86a724d6dc5ad4f7cac1f32751f0102a58a610..1ddc2df53daaac3c73174a2df8de48ad45653611 100644 (file)
@@ -144,7 +144,7 @@ struct RegisterPassBase {
     : PIObj(Name, Arg, TI, NormalCtor, CFGOnly) {
     registerPass();
   }
-  RegisterPassBase(intptr_t TI)
+  explicit RegisterPassBase(intptr_t TI)
     : PIObj("", "", TI) {
     // This ctor may only be used for analysis groups: it does not auto-register
     // the pass.
index 310fa7f00650ce04feea7918bcec6d261267007a..94477bab252fae8c8287aa2876866f33186fb289 100644 (file)
@@ -57,10 +57,10 @@ public:
 /// @{
 public:
   /// @brief Construct from a module
-  SlotMachine(const Module *M);
+  explicit SlotMachine(const Module *M);
 
   /// @brief Construct from a function, starting out in incorp state.
-  SlotMachine(const Function *F);
+  explicit SlotMachine(const Function *F);
 
 /// @}
 /// @name Accessors