[llvm-commits] [llvm] r46506 - in /llvm/trunk: include/llvm/CodeGen/MachineOperand.h include/llvm/CodeGen/MachineRegisterInfo.h include/llvm/PassSupport.h lib/VMCore/AsmWriter.cpp

Dan Gohman djg at cray.com
Tue Jan 29 03:36:13 PST 2008


Author: djg
Date: Tue Jan 29 05:36:12 2008
New Revision: 46506

URL: http://llvm.org/viewvc/llvm-project?rev=46506&view=rev
Log:
Add explicit keywords.

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

Modified: llvm/trunk/include/llvm/CodeGen/MachineOperand.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineOperand.h?rev=46506&r1=46505&r2=46506&view=diff

==============================================================================
--- llvm/trunk/include/llvm/CodeGen/MachineOperand.h (original)
+++ llvm/trunk/include/llvm/CodeGen/MachineOperand.h Tue Jan 29 05:36:12 2008
@@ -97,7 +97,7 @@
     } OffsetedInfo;
   } Contents;
   
-  MachineOperand(MachineOperandType K) : OpKind(K), ParentMI(0) {}
+  explicit MachineOperand(MachineOperandType K) : OpKind(K), ParentMI(0) {}
 public:
   MachineOperand(const MachineOperand &M) {
     *this = M;

Modified: llvm/trunk/include/llvm/CodeGen/MachineRegisterInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineRegisterInfo.h?rev=46506&r1=46505&r2=46506&view=diff

==============================================================================
--- llvm/trunk/include/llvm/CodeGen/MachineRegisterInfo.h (original)
+++ llvm/trunk/include/llvm/CodeGen/MachineRegisterInfo.h Tue Jan 29 05:36:12 2008
@@ -54,7 +54,7 @@
   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 @@
   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) {

Modified: llvm/trunk/include/llvm/PassSupport.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/PassSupport.h?rev=46506&r1=46505&r2=46506&view=diff

==============================================================================
--- llvm/trunk/include/llvm/PassSupport.h (original)
+++ llvm/trunk/include/llvm/PassSupport.h Tue Jan 29 05:36:12 2008
@@ -144,7 +144,7 @@
     : 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.

Modified: llvm/trunk/lib/VMCore/AsmWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/AsmWriter.cpp?rev=46506&r1=46505&r2=46506&view=diff

==============================================================================
--- llvm/trunk/lib/VMCore/AsmWriter.cpp (original)
+++ llvm/trunk/lib/VMCore/AsmWriter.cpp Tue Jan 29 05:36:12 2008
@@ -57,10 +57,10 @@
 /// @{
 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





More information about the llvm-commits mailing list