[llvm-commits] [llvm] r53179 - in /llvm/trunk: include/llvm/ADT/ include/llvm/Analysis/ include/llvm/Support/ include/llvm/Transforms/Utils/ lib/CodeGen/SelectionDAG/ lib/Target/ARM/ lib/Target/CellSPU/ lib/Target/IA64/ lib/Target/Mips/ lib/Target/PIC16/ lib/Target/PowerPC/ lib/Target/Sparc/ lib/VMCore/ utils/TableGen/
Dan Gohman
gohman at apple.com
Mon Jul 7 11:00:38 PDT 2008
Author: djg
Date: Mon Jul 7 13:00:37 2008
New Revision: 53179
URL: http://llvm.org/viewvc/llvm-project?rev=53179&view=rev
Log:
Add explicit keywords.
Modified:
llvm/trunk/include/llvm/ADT/FoldingSet.h
llvm/trunk/include/llvm/Analysis/LoopInfo.h
llvm/trunk/include/llvm/Support/Timer.h
llvm/trunk/include/llvm/Transforms/Utils/BasicInliner.h
llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp
llvm/trunk/lib/Target/ARM/ARMISelDAGToDAG.cpp
llvm/trunk/lib/Target/CellSPU/SPUISelDAGToDAG.cpp
llvm/trunk/lib/Target/IA64/IA64ISelDAGToDAG.cpp
llvm/trunk/lib/Target/Mips/MipsISelDAGToDAG.cpp
llvm/trunk/lib/Target/PIC16/PIC16ISelDAGToDAG.cpp
llvm/trunk/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
llvm/trunk/lib/Target/Sparc/SparcISelDAGToDAG.cpp
llvm/trunk/lib/VMCore/LeakDetector.cpp
llvm/trunk/lib/VMCore/Type.cpp
llvm/trunk/utils/TableGen/Record.h
Modified: llvm/trunk/include/llvm/ADT/FoldingSet.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/FoldingSet.h?rev=53179&r1=53178&r2=53179&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/FoldingSet.h (original)
+++ llvm/trunk/include/llvm/ADT/FoldingSet.h Mon Jul 7 13:00:37 2008
@@ -317,7 +317,7 @@
template<class T>
class FoldingSetIterator : public FoldingSetIteratorImpl {
public:
- FoldingSetIterator(void **Bucket) : FoldingSetIteratorImpl(Bucket) {}
+ explicit FoldingSetIterator(void **Bucket) : FoldingSetIteratorImpl(Bucket) {}
T &operator*() const {
return *static_cast<T*>(NodePtr);
@@ -345,7 +345,7 @@
protected:
void *Ptr;
- FoldingSetBucketIteratorImpl(void **Bucket);
+ explicit FoldingSetBucketIteratorImpl(void **Bucket);
FoldingSetBucketIteratorImpl(void **Bucket, bool)
: Ptr(reinterpret_cast<void*>(Bucket)) {}
@@ -369,7 +369,7 @@
template<class T>
class FoldingSetBucketIterator : public FoldingSetBucketIteratorImpl {
public:
- FoldingSetBucketIterator(void **Bucket) :
+ explicit FoldingSetBucketIterator(void **Bucket) :
FoldingSetBucketIteratorImpl(Bucket) {}
FoldingSetBucketIterator(void **Bucket, bool) :
@@ -394,7 +394,7 @@
class FoldingSetNodeWrapper : public FoldingSetNode {
T data;
public:
- FoldingSetNodeWrapper(const T& x) : data(x) {}
+ explicit FoldingSetNodeWrapper(const T& x) : data(x) {}
virtual ~FoldingSetNodeWrapper() {}
template<typename A1>
Modified: llvm/trunk/include/llvm/Analysis/LoopInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/LoopInfo.h?rev=53179&r1=53178&r2=53179&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/LoopInfo.h (original)
+++ llvm/trunk/include/llvm/Analysis/LoopInfo.h Mon Jul 7 13:00:37 2008
@@ -611,7 +611,7 @@
private:
friend class LoopInfoBase<BlockT>;
- LoopBase(BlockT *BB) : ParentLoop(0) {
+ explicit LoopBase(BlockT *BB) : ParentLoop(0) {
Blocks.push_back(BB);
}
};
Modified: llvm/trunk/include/llvm/Support/Timer.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/Timer.h?rev=53179&r1=53178&r2=53179&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/Timer.h (original)
+++ llvm/trunk/include/llvm/Support/Timer.h Mon Jul 7 13:00:37 2008
@@ -44,7 +44,7 @@
bool Started; // Has this time variable ever been started?
TimerGroup *TG; // The TimerGroup this Timer is in.
public:
- Timer(const std::string &N);
+ explicit Timer(const std::string &N);
Timer(const std::string &N, TimerGroup &tg);
Timer(const Timer &T);
~Timer();
@@ -116,7 +116,7 @@
Timer &T;
TimeRegion(const TimeRegion &); // DO NOT IMPLEMENT
public:
- TimeRegion(Timer &t) : T(t) {
+ explicit TimeRegion(Timer &t) : T(t) {
T.startTimer();
}
~TimeRegion() {
@@ -131,7 +131,7 @@
/// is primarily used for debugging and for hunting performance problems.
///
struct NamedRegionTimer : public TimeRegion {
- NamedRegionTimer(const std::string &Name);
+ explicit NamedRegionTimer(const std::string &Name);
};
@@ -145,7 +145,7 @@
unsigned NumTimers;
std::vector<Timer> TimersToPrint;
public:
- TimerGroup(const std::string &name) : Name(name), NumTimers(0) {}
+ explicit TimerGroup(const std::string &name) : Name(name), NumTimers(0) {}
~TimerGroup() {
assert(NumTimers == 0 &&
"TimerGroup destroyed before all contained timers!");
Modified: llvm/trunk/include/llvm/Transforms/Utils/BasicInliner.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Transforms/Utils/BasicInliner.h?rev=53179&r1=53178&r2=53179&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Transforms/Utils/BasicInliner.h (original)
+++ llvm/trunk/include/llvm/Transforms/Utils/BasicInliner.h Mon Jul 7 13:00:37 2008
@@ -30,7 +30,7 @@
class BasicInliner {
public:
- BasicInliner(TargetData *T = NULL);
+ explicit BasicInliner(TargetData *T = NULL);
~BasicInliner();
/// addFunction - Add function into the list of functions to process.
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp?rev=53179&r1=53178&r2=53179&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp Mon Jul 7 13:00:37 2008
@@ -122,8 +122,7 @@
}
public:
-
- SelectionDAGLegalize(SelectionDAG &DAG);
+ explicit SelectionDAGLegalize(SelectionDAG &DAG);
/// getTypeAction - Return how we should legalize values of this type, either
/// it is already legal or we need to expand it into multiple registers of
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp?rev=53179&r1=53178&r2=53179&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp Mon Jul 7 13:00:37 2008
@@ -284,7 +284,7 @@
public SelectionDAG::DAGUpdateListener {
DAGTypeLegalizer &DTL;
public:
- NodeUpdateListener(DAGTypeLegalizer &dtl) : DTL(dtl) {}
+ explicit NodeUpdateListener(DAGTypeLegalizer &dtl) : DTL(dtl) {}
virtual void NodeDeleted(SDNode *N, SDNode *E) {
assert(N->getNodeId() != DAGTypeLegalizer::Processed &&
Modified: llvm/trunk/lib/Target/ARM/ARMISelDAGToDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/ARMISelDAGToDAG.cpp?rev=53179&r1=53178&r2=53179&view=diff
==============================================================================
--- llvm/trunk/lib/Target/ARM/ARMISelDAGToDAG.cpp (original)
+++ llvm/trunk/lib/Target/ARM/ARMISelDAGToDAG.cpp Mon Jul 7 13:00:37 2008
@@ -44,7 +44,7 @@
const ARMSubtarget *Subtarget;
public:
- ARMDAGToDAGISel(ARMTargetMachine &TM)
+ explicit ARMDAGToDAGISel(ARMTargetMachine &TM)
: SelectionDAGISel(Lowering), Lowering(TM),
Subtarget(&TM.getSubtarget<ARMSubtarget>()) {
}
Modified: llvm/trunk/lib/Target/CellSPU/SPUISelDAGToDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/CellSPU/SPUISelDAGToDAG.cpp?rev=53179&r1=53178&r2=53179&view=diff
==============================================================================
--- llvm/trunk/lib/Target/CellSPU/SPUISelDAGToDAG.cpp (original)
+++ llvm/trunk/lib/Target/CellSPU/SPUISelDAGToDAG.cpp Mon Jul 7 13:00:37 2008
@@ -227,7 +227,7 @@
unsigned GlobalBaseReg;
public:
- SPUDAGToDAGISel(SPUTargetMachine &tm) :
+ explicit SPUDAGToDAGISel(SPUTargetMachine &tm) :
SelectionDAGISel(*tm.getTargetLowering()),
TM(tm),
SPUtli(*tm.getTargetLowering())
Modified: llvm/trunk/lib/Target/IA64/IA64ISelDAGToDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/IA64/IA64ISelDAGToDAG.cpp?rev=53179&r1=53178&r2=53179&view=diff
==============================================================================
--- llvm/trunk/lib/Target/IA64/IA64ISelDAGToDAG.cpp (original)
+++ llvm/trunk/lib/Target/IA64/IA64ISelDAGToDAG.cpp Mon Jul 7 13:00:37 2008
@@ -40,7 +40,7 @@
IA64TargetLowering IA64Lowering;
unsigned GlobalBaseReg;
public:
- IA64DAGToDAGISel(IA64TargetMachine &TM)
+ explicit IA64DAGToDAGISel(IA64TargetMachine &TM)
: SelectionDAGISel(IA64Lowering), IA64Lowering(*TM.getTargetLowering()) {}
virtual bool runOnFunction(Function &Fn) {
Modified: llvm/trunk/lib/Target/Mips/MipsISelDAGToDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsISelDAGToDAG.cpp?rev=53179&r1=53178&r2=53179&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsISelDAGToDAG.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MipsISelDAGToDAG.cpp Mon Jul 7 13:00:37 2008
@@ -61,7 +61,8 @@
const MipsSubtarget &Subtarget;
public:
- MipsDAGToDAGISel(MipsTargetMachine &tm) : SelectionDAGISel(MipsLowering),
+ explicit MipsDAGToDAGISel(MipsTargetMachine &tm) :
+ SelectionDAGISel(MipsLowering),
TM(tm), MipsLowering(*TM.getTargetLowering()),
Subtarget(tm.getSubtarget<MipsSubtarget>()) {}
Modified: llvm/trunk/lib/Target/PIC16/PIC16ISelDAGToDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PIC16/PIC16ISelDAGToDAG.cpp?rev=53179&r1=53178&r2=53179&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PIC16/PIC16ISelDAGToDAG.cpp (original)
+++ llvm/trunk/lib/Target/PIC16/PIC16ISelDAGToDAG.cpp Mon Jul 7 13:00:37 2008
@@ -57,7 +57,7 @@
PIC16TargetLowering PIC16Lowering;
public:
- PIC16DAGToDAGISel(PIC16TargetMachine &tm) :
+ explicit PIC16DAGToDAGISel(PIC16TargetMachine &tm) :
SelectionDAGISel(PIC16Lowering),
TM(tm), PIC16Lowering(*TM.getTargetLowering()) {}
Modified: llvm/trunk/lib/Target/PowerPC/PPCISelDAGToDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/PowerPC/PPCISelDAGToDAG.cpp?rev=53179&r1=53178&r2=53179&view=diff
==============================================================================
--- llvm/trunk/lib/Target/PowerPC/PPCISelDAGToDAG.cpp (original)
+++ llvm/trunk/lib/Target/PowerPC/PPCISelDAGToDAG.cpp Mon Jul 7 13:00:37 2008
@@ -45,7 +45,7 @@
const PPCSubtarget &PPCSubTarget;
unsigned GlobalBaseReg;
public:
- PPCDAGToDAGISel(PPCTargetMachine &tm)
+ explicit PPCDAGToDAGISel(PPCTargetMachine &tm)
: SelectionDAGISel(PPCLowering), TM(tm),
PPCLowering(*TM.getTargetLowering()),
PPCSubTarget(*TM.getSubtargetImpl()) {}
Modified: llvm/trunk/lib/Target/Sparc/SparcISelDAGToDAG.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Sparc/SparcISelDAGToDAG.cpp?rev=53179&r1=53178&r2=53179&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Sparc/SparcISelDAGToDAG.cpp (original)
+++ llvm/trunk/lib/Target/Sparc/SparcISelDAGToDAG.cpp Mon Jul 7 13:00:37 2008
@@ -35,7 +35,7 @@
/// make the right decision when generating code for different targets.
const SparcSubtarget &Subtarget;
public:
- SparcDAGToDAGISel(TargetMachine &TM)
+ explicit SparcDAGToDAGISel(TargetMachine &TM)
: SelectionDAGISel(Lowering), Lowering(TM),
Subtarget(TM.getSubtarget<SparcSubtarget>()) {
}
Modified: llvm/trunk/lib/VMCore/LeakDetector.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/LeakDetector.cpp?rev=53179&r1=53178&r2=53179&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/LeakDetector.cpp (original)
+++ llvm/trunk/lib/VMCore/LeakDetector.cpp Mon Jul 7 13:00:37 2008
@@ -31,7 +31,7 @@
template <typename T>
struct VISIBILITY_HIDDEN LeakDetectorImpl {
- LeakDetectorImpl(const char* const name) : Cache(0), Name(name) { }
+ explicit LeakDetectorImpl(const char* const name) : Cache(0), Name(name) { }
// Because the most common usage pattern, by far, is to add a
// garbage object, then remove it immediately, we optimize this
Modified: llvm/trunk/lib/VMCore/Type.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/VMCore/Type.cpp?rev=53179&r1=53178&r2=53179&view=diff
==============================================================================
--- llvm/trunk/lib/VMCore/Type.cpp (original)
+++ llvm/trunk/lib/VMCore/Type.cpp Mon Jul 7 13:00:37 2008
@@ -431,7 +431,7 @@
namespace {
struct BuiltinIntegerType : public IntegerType {
- BuiltinIntegerType(unsigned W) : IntegerType(W) {}
+ explicit BuiltinIntegerType(unsigned W) : IntegerType(W) {}
};
}
const IntegerType *Type::Int1Ty = new BuiltinIntegerType(1);
Modified: llvm/trunk/utils/TableGen/Record.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/Record.h?rev=53179&r1=53178&r2=53179&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/Record.h (original)
+++ llvm/trunk/utils/TableGen/Record.h Mon Jul 7 13:00:37 2008
@@ -151,7 +151,7 @@
class BitsRecTy : public RecTy {
unsigned Size;
public:
- BitsRecTy(unsigned Sz) : Size(Sz) {}
+ explicit BitsRecTy(unsigned Sz) : Size(Sz) {}
unsigned getNumBits() const { return Size; }
@@ -268,7 +268,7 @@
class ListRecTy : public RecTy {
RecTy *Ty;
public:
- ListRecTy(RecTy *T) : Ty(T) {}
+ explicit ListRecTy(RecTy *T) : Ty(T) {}
RecTy *getElementType() const { return Ty; }
@@ -381,7 +381,7 @@
class RecordRecTy : public RecTy {
Record *Rec;
public:
- RecordRecTy(Record *R) : Rec(R) {}
+ explicit RecordRecTy(Record *R) : Rec(R) {}
Record *getRecord() const { return Rec; }
@@ -966,7 +966,7 @@
std::vector<Record*> SuperClasses;
public:
- Record(const std::string &N) : Name(N) {}
+ explicit Record(const std::string &N) : Name(N) {}
~Record() {}
const std::string &getName() const { return Name; }
More information about the llvm-commits
mailing list