[llvm-commits] [llvm] r64915 - in /llvm/trunk: include/llvm/ADT/SmallVector.h lib/Target/Sparc/FPMover.cpp lib/Transforms/IPO/ArgumentPromotion.cpp utils/TableGen/AsmWriterEmitter.cpp utils/TableGen/DAGISelEmitter.h
Dan Gohman
gohman at apple.com
Wed Feb 18 08:37:45 PST 2009
Author: djg
Date: Wed Feb 18 10:37:45 2009
New Revision: 64915
URL: http://llvm.org/viewvc/llvm-project?rev=64915&view=rev
Log:
Add explicit keywords.
Modified:
llvm/trunk/include/llvm/ADT/SmallVector.h
llvm/trunk/lib/Target/Sparc/FPMover.cpp
llvm/trunk/lib/Transforms/IPO/ArgumentPromotion.cpp
llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp
llvm/trunk/utils/TableGen/DAGISelEmitter.h
Modified: llvm/trunk/include/llvm/ADT/SmallVector.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/SmallVector.h?rev=64915&r1=64914&r2=64915&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/SmallVector.h (original)
+++ llvm/trunk/include/llvm/ADT/SmallVector.h Wed Feb 18 10:37:45 2009
@@ -75,7 +75,7 @@
// Space after 'FirstEl' is clobbered, do not add any instance vars after it.
public:
// Default ctor - Initialize to empty.
- SmallVectorImpl(unsigned N)
+ explicit SmallVectorImpl(unsigned N)
: Begin(reinterpret_cast<T*>(&FirstEl)),
End(reinterpret_cast<T*>(&FirstEl)),
Capacity(reinterpret_cast<T*>(&FirstEl)+N) {
Modified: llvm/trunk/lib/Target/Sparc/FPMover.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/FPMover.cpp?rev=64915&r1=64914&r2=64915&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Sparc/FPMover.cpp (original)
+++ llvm/trunk/lib/Target/Sparc/FPMover.cpp Wed Feb 18 10:37:45 2009
@@ -33,7 +33,7 @@
TargetMachine &TM;
static char ID;
- FPMover(TargetMachine &tm)
+ explicit FPMover(TargetMachine &tm)
: MachineFunctionPass(&ID), TM(tm) { }
virtual const char *getPassName() const {
Modified: llvm/trunk/lib/Transforms/IPO/ArgumentPromotion.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/ArgumentPromotion.cpp?rev=64915&r1=64914&r2=64915&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/ArgumentPromotion.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/ArgumentPromotion.cpp Wed Feb 18 10:37:45 2009
@@ -66,8 +66,8 @@
virtual bool runOnSCC(const std::vector<CallGraphNode *> &SCC);
static char ID; // Pass identification, replacement for typeid
- ArgPromotion(unsigned maxElements = 3) : CallGraphSCCPass(&ID),
- maxElements(maxElements) {}
+ explicit ArgPromotion(unsigned maxElements = 3)
+ : CallGraphSCCPass(&ID), maxElements(maxElements) {}
/// A vector used to hold the indices of a single GEP instruction
typedef std::vector<uint64_t> IndicesVector;
Modified: llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp?rev=64915&r1=64914&r2=64915&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp (original)
+++ llvm/trunk/utils/TableGen/AsmWriterEmitter.cpp Wed Feb 18 10:37:45 2009
@@ -48,7 +48,7 @@
// To make VS STL happy
AsmWriterOperand():OperandType(isLiteralTextOperand) {}
- AsmWriterOperand(const std::string &LitStr)
+ explicit AsmWriterOperand(const std::string &LitStr)
: OperandType(isLiteralTextOperand), Str(LitStr) {}
AsmWriterOperand(const std::string &Printer, unsigned OpNo,
Modified: llvm/trunk/utils/TableGen/DAGISelEmitter.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/DAGISelEmitter.h?rev=64915&r1=64914&r2=64915&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/DAGISelEmitter.h (original)
+++ llvm/trunk/utils/TableGen/DAGISelEmitter.h Wed Feb 18 10:37:45 2009
@@ -27,7 +27,7 @@
RecordKeeper &Records;
CodeGenDAGPatterns CGP;
public:
- DAGISelEmitter(RecordKeeper &R) : Records(R), CGP(R) {}
+ explicit DAGISelEmitter(RecordKeeper &R) : Records(R), CGP(R) {}
// run - Output the isel, returning true on failure.
void run(std::ostream &OS);
More information about the llvm-commits
mailing list