Add explicit keywords.

llvm-svn: 64915
This commit is contained in:
Dan Gohman 2009-02-18 16:37:45 +00:00
parent 18d85e7403
commit 8cab4c44bb
5 changed files with 6 additions and 6 deletions
llvm
include/llvm/ADT
lib
Target/Sparc
Transforms/IPO
utils/TableGen

View File

@ -75,7 +75,7 @@ protected:
// 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) {

View File

@ -33,7 +33,7 @@ namespace {
TargetMachine &TM;
static char ID;
FPMover(TargetMachine &tm)
explicit FPMover(TargetMachine &tm)
: MachineFunctionPass(&ID), TM(tm) { }
virtual const char *getPassName() const {

View File

@ -66,8 +66,8 @@ namespace {
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;

View File

@ -48,7 +48,7 @@ namespace llvm {
// 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,

View File

@ -27,7 +27,7 @@ class DAGISelEmitter : public TableGenBackend {
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);