diff options
author | Dan Gohman <gohman@apple.com> | 2008-03-25 22:06:05 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-03-25 22:06:05 +0000 |
commit | 950a4c40b823cd4f09dc71be635229246dfd6cac (patch) | |
tree | ff52517c682e08112a66247bc8b85f81664f72b3 /utils | |
parent | cfbb2f074da2842e42956d3b4c21e91b37f36f06 (diff) | |
download | external_llvm-950a4c40b823cd4f09dc71be635229246dfd6cac.zip external_llvm-950a4c40b823cd4f09dc71be635229246dfd6cac.tar.gz external_llvm-950a4c40b823cd4f09dc71be635229246dfd6cac.tar.bz2 |
Add explicit keywords.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48801 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r-- | utils/TableGen/DAGISelEmitter.cpp | 2 | ||||
-rw-r--r-- | utils/TableGen/Record.h | 19 | ||||
-rw-r--r-- | utils/TableGen/RegisterInfoEmitter.cpp | 2 |
3 files changed, 12 insertions, 11 deletions
diff --git a/utils/TableGen/DAGISelEmitter.cpp b/utils/TableGen/DAGISelEmitter.cpp index dc95e79..70d88ce 100644 --- a/utils/TableGen/DAGISelEmitter.cpp +++ b/utils/TableGen/DAGISelEmitter.cpp @@ -2072,7 +2072,7 @@ void DAGISelEmitter::run(std::ostream &OS) { OS << " std::vector<SDNode*> &ISelQueue;\n"; OS << " bool HadDelete;\n"; OS << " public:\n"; - OS << " ISelQueueUpdater(std::vector<SDNode*> &isq)\n"; + OS << " explicit ISelQueueUpdater(std::vector<SDNode*> &isq)\n"; OS << " : ISelQueue(isq), HadDelete(false) {}\n"; OS << " \n"; OS << " bool hadDelete() const { return HadDelete; }\n"; diff --git a/utils/TableGen/Record.h b/utils/TableGen/Record.h index 5f0e4c7..83d358a 100644 --- a/utils/TableGen/Record.h +++ b/utils/TableGen/Record.h @@ -509,7 +509,7 @@ public: class BitInit : public Init { bool Value; public: - BitInit(bool V) : Value(V) {} + explicit BitInit(bool V) : Value(V) {} bool getValue() const { return Value; } @@ -526,7 +526,7 @@ public: class BitsInit : public Init { std::vector<Init*> Bits; public: - BitsInit(unsigned Size) : Bits(Size) {} + explicit BitsInit(unsigned Size) : Bits(Size) {} unsigned getNumBits() const { return Bits.size(); } @@ -567,7 +567,7 @@ public: class IntInit : public Init { int Value; public: - IntInit(int V) : Value(V) {} + explicit IntInit(int V) : Value(V) {} int getValue() const { return Value; } @@ -585,7 +585,7 @@ public: class StringInit : public Init { std::string Value; public: - StringInit(const std::string &V) : Value(V) {} + explicit StringInit(const std::string &V) : Value(V) {} const std::string &getValue() const { return Value; } @@ -601,7 +601,7 @@ public: class CodeInit : public Init { std::string Value; public: - CodeInit(const std::string &V) : Value(V) {} + explicit CodeInit(const std::string &V) : Value(V) {} const std::string getValue() const { return Value; } @@ -617,7 +617,7 @@ public: class ListInit : public Init { std::vector<Init*> Values; public: - ListInit(std::vector<Init*> &Vs) { + explicit ListInit(std::vector<Init*> &Vs) { Values.swap(Vs); } @@ -693,7 +693,7 @@ public: class TypedInit : public Init { RecTy *Ty; public: - TypedInit(RecTy *T) : Ty(T) {} + explicit TypedInit(RecTy *T) : Ty(T) {} RecTy *getType() const { return Ty; } @@ -719,7 +719,8 @@ public: class VarInit : public TypedInit { std::string VarName; public: - VarInit(const std::string &VN, RecTy *T) : TypedInit(T), VarName(VN) {} + explicit VarInit(const std::string &VN, RecTy *T) + : TypedInit(T), VarName(VN) {} virtual Init *convertInitializerTo(RecTy *Ty) { return Ty->convertValue(this); @@ -807,7 +808,7 @@ public: class DefInit : public Init { Record *Def; public: - DefInit(Record *D) : Def(D) {} + explicit DefInit(Record *D) : Def(D) {} virtual Init *convertInitializerTo(RecTy *Ty) { return Ty->convertValue(this); diff --git a/utils/TableGen/RegisterInfoEmitter.cpp b/utils/TableGen/RegisterInfoEmitter.cpp index 9577580..2e19202 100644 --- a/utils/TableGen/RegisterInfoEmitter.cpp +++ b/utils/TableGen/RegisterInfoEmitter.cpp @@ -58,7 +58,7 @@ void RegisterInfoEmitter::runHeader(std::ostream &OS) { OS << "namespace llvm {\n\n"; OS << "struct " << ClassName << " : public TargetRegisterInfo {\n" - << " " << ClassName + << " explicit " << ClassName << "(int CallFrameSetupOpcode = -1, int CallFrameDestroyOpcode = -1);\n" << " virtual int getDwarfRegNumFull(unsigned RegNum, " << "unsigned Flavour) const;\n" |