[llvm-commits] [llvm] r40673 - in /llvm/trunk: include/llvm/Analysis/ include/llvm/CodeGen/ include/llvm/Target/ include/llvm/Transforms/IPO/ lib/Analysis/ lib/Analysis/IPA/ lib/Transforms/IPO/ lib/Transforms/Scalar/ lib/Transforms/Utils/
Dan Gohman
djg at cray.com
Wed Aug 1 08:32:29 PDT 2007
Author: djg
Date: Wed Aug 1 10:32:29 2007
New Revision: 40673
URL: http://llvm.org/viewvc/llvm-project?rev=40673&view=rev
Log:
More explicit keywords.
Modified:
llvm/trunk/include/llvm/Analysis/LoopPass.h
llvm/trunk/include/llvm/CodeGen/MachineConstantPool.h
llvm/trunk/include/llvm/Target/TargetLowering.h
llvm/trunk/include/llvm/Transforms/IPO/InlinerPass.h
llvm/trunk/lib/Analysis/IPA/CallGraphSCCPass.cpp
llvm/trunk/lib/Analysis/ProfileInfoLoaderPass.cpp
llvm/trunk/lib/Transforms/IPO/ExtractFunction.cpp
llvm/trunk/lib/Transforms/IPO/Internalize.cpp
llvm/trunk/lib/Transforms/IPO/LoopExtractor.cpp
llvm/trunk/lib/Transforms/IPO/StripSymbols.cpp
llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp
llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp
llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp
llvm/trunk/lib/Transforms/Scalar/ScalarReplAggregates.cpp
llvm/trunk/lib/Transforms/Utils/LowerAllocations.cpp
llvm/trunk/lib/Transforms/Utils/LowerInvoke.cpp
llvm/trunk/lib/Transforms/Utils/LowerSelect.cpp
Modified: llvm/trunk/include/llvm/Analysis/LoopPass.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/LoopPass.h?rev=40673&r1=40672&r2=40673&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/LoopPass.h (original)
+++ llvm/trunk/include/llvm/Analysis/LoopPass.h Wed Aug 1 10:32:29 2007
@@ -84,7 +84,7 @@
public:
static char ID;
- LPPassManager(int Depth);
+ explicit LPPassManager(int Depth);
/// run - Execute all of the passes scheduled for execution. Keep track of
/// whether any of the passes modifies the module, and if so, return true.
Modified: llvm/trunk/include/llvm/CodeGen/MachineConstantPool.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineConstantPool.h?rev=40673&r1=40672&r2=40673&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/MachineConstantPool.h (original)
+++ llvm/trunk/include/llvm/CodeGen/MachineConstantPool.h Wed Aug 1 10:32:29 2007
@@ -114,7 +114,8 @@
std::vector<MachineConstantPoolEntry> Constants; ///< The pool of constants.
public:
/// @brief The only constructor.
- MachineConstantPool(const TargetData *td) : TD(td), PoolAlignment(1) {}
+ explicit MachineConstantPool(const TargetData *td)
+ : TD(td), PoolAlignment(1) {}
~MachineConstantPool();
/// getConstantPoolAlignment - Return the log2 of the alignment required by
Modified: llvm/trunk/include/llvm/Target/TargetLowering.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetLowering.h?rev=40673&r1=40672&r2=40673&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Target/TargetLowering.h (original)
+++ llvm/trunk/include/llvm/Target/TargetLowering.h Wed Aug 1 10:32:29 2007
@@ -76,7 +76,7 @@
SchedulingForRegPressure // Scheduling for lowest register pressure.
};
- TargetLowering(TargetMachine &TM);
+ explicit TargetLowering(TargetMachine &TM);
virtual ~TargetLowering();
TargetMachine &getTargetMachine() const { return TM; }
@@ -510,7 +510,7 @@
SDOperand Old;
SDOperand New;
- TargetLoweringOpt(SelectionDAG &InDAG) : DAG(InDAG) {}
+ explicit TargetLoweringOpt(SelectionDAG &InDAG) : DAG(InDAG) {}
bool CombineTo(SDOperand O, SDOperand N) {
Old = O;
Modified: llvm/trunk/include/llvm/Transforms/IPO/InlinerPass.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Transforms/IPO/InlinerPass.h?rev=40673&r1=40672&r2=40673&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Transforms/IPO/InlinerPass.h (original)
+++ llvm/trunk/include/llvm/Transforms/IPO/InlinerPass.h Wed Aug 1 10:32:29 2007
@@ -26,7 +26,7 @@
/// perform the inlining operations that does not depend on the policy.
///
struct Inliner : public CallGraphSCCPass {
- Inliner(const void *ID);
+ explicit Inliner(const void *ID);
/// getAnalysisUsage - For this class, we declare that we require and preserve
/// the call graph. If the derived class implements this method, it should
Modified: llvm/trunk/lib/Analysis/IPA/CallGraphSCCPass.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/IPA/CallGraphSCCPass.cpp?rev=40673&r1=40672&r2=40673&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/IPA/CallGraphSCCPass.cpp (original)
+++ llvm/trunk/lib/Analysis/IPA/CallGraphSCCPass.cpp Wed Aug 1 10:32:29 2007
@@ -31,7 +31,7 @@
public:
static char ID;
- CGPassManager(int Depth)
+ explicit CGPassManager(int Depth)
: ModulePass((intptr_t)&ID), PMDataManager(Depth) { }
/// run - Execute all of the passes scheduled for execution. Keep track of
Modified: llvm/trunk/lib/Analysis/ProfileInfoLoaderPass.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ProfileInfoLoaderPass.cpp?rev=40673&r1=40672&r2=40673&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/ProfileInfoLoaderPass.cpp (original)
+++ llvm/trunk/lib/Analysis/ProfileInfoLoaderPass.cpp Wed Aug 1 10:32:29 2007
@@ -33,7 +33,7 @@
std::string Filename;
public:
static char ID; // Class identification, replacement for typeinfo
- LoaderPass(const std::string &filename = "")
+ explicit LoaderPass(const std::string &filename = "")
: ModulePass((intptr_t)&ID), Filename(filename) {
if (filename.empty()) Filename = ProfileInfoFilename;
}
Modified: llvm/trunk/lib/Transforms/IPO/ExtractFunction.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/ExtractFunction.cpp?rev=40673&r1=40672&r2=40673&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/ExtractFunction.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/ExtractFunction.cpp Wed Aug 1 10:32:29 2007
@@ -31,8 +31,8 @@
/// specified function. Otherwise, it deletes as much of the module as
/// possible, except for the function specified.
///
- FunctionExtractorPass(Function *F = 0, bool deleteFn = true,
- bool relinkCallees = false)
+ explicit FunctionExtractorPass(Function *F = 0, bool deleteFn = true,
+ bool relinkCallees = false)
: ModulePass((intptr_t)&ID), Named(F), deleteFunc(deleteFn),
reLink(relinkCallees) {}
Modified: llvm/trunk/lib/Transforms/IPO/Internalize.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/Internalize.cpp?rev=40673&r1=40672&r2=40673&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/Internalize.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/Internalize.cpp Wed Aug 1 10:32:29 2007
@@ -47,8 +47,8 @@
bool DontInternalize;
public:
static char ID; // Pass identification, replacement for typeid
- InternalizePass(bool InternalizeEverything = true);
- InternalizePass(const std::vector <const char *>& exportList);
+ explicit InternalizePass(bool InternalizeEverything = true);
+ explicit InternalizePass(const std::vector <const char *>& exportList);
void LoadFile(const char *Filename);
virtual bool runOnModule(Module &M);
};
Modified: llvm/trunk/lib/Transforms/IPO/LoopExtractor.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/LoopExtractor.cpp?rev=40673&r1=40672&r2=40673&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/LoopExtractor.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/LoopExtractor.cpp Wed Aug 1 10:32:29 2007
@@ -37,7 +37,7 @@
static char ID; // Pass identification, replacement for typeid
unsigned NumLoops;
- LoopExtractor(unsigned numLoops = ~0)
+ explicit LoopExtractor(unsigned numLoops = ~0)
: FunctionPass((intptr_t)&ID), NumLoops(numLoops) {}
virtual bool runOnFunction(Function &F);
@@ -151,7 +151,7 @@
std::vector<BasicBlock*> BlocksToNotExtract;
public:
static char ID; // Pass identification, replacement for typeid
- BlockExtractorPass(std::vector<BasicBlock*> &B)
+ explicit BlockExtractorPass(std::vector<BasicBlock*> &B)
: ModulePass((intptr_t)&ID), BlocksToNotExtract(B) {}
BlockExtractorPass() : ModulePass((intptr_t)&ID) {}
Modified: llvm/trunk/lib/Transforms/IPO/StripSymbols.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/StripSymbols.cpp?rev=40673&r1=40672&r2=40673&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/StripSymbols.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/StripSymbols.cpp Wed Aug 1 10:32:29 2007
@@ -38,7 +38,7 @@
bool OnlyDebugInfo;
public:
static char ID; // Pass identification, replacement for typeid
- StripSymbols(bool ODI = false)
+ explicit StripSymbols(bool ODI = false)
: ModulePass((intptr_t)&ID), OnlyDebugInfo(ODI) {}
virtual bool runOnModule(Module &M);
Modified: llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp?rev=40673&r1=40672&r2=40673&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp Wed Aug 1 10:32:29 2007
@@ -40,8 +40,8 @@
const TargetLowering *TLI;
public:
static char ID; // Pass identification, replacement for typeid
- CodeGenPrepare(const TargetLowering *tli = 0) : FunctionPass((intptr_t)&ID),
- TLI(tli) {}
+ explicit CodeGenPrepare(const TargetLowering *tli = 0)
+ : FunctionPass((intptr_t)&ID), TLI(tli) {}
bool runOnFunction(Function &F);
private:
Modified: llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp?rev=40673&r1=40672&r2=40673&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopStrengthReduce.cpp Wed Aug 1 10:32:29 2007
@@ -145,7 +145,7 @@
public:
static char ID; // Pass ID, replacement for typeid
- LoopStrengthReduce(const TargetLowering *tli = NULL) :
+ explicit LoopStrengthReduce(const TargetLowering *tli = NULL) :
LoopPass((intptr_t)&ID), TLI(tli) {
}
Modified: llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp?rev=40673&r1=40672&r2=40673&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LoopUnswitch.cpp Wed Aug 1 10:32:29 2007
@@ -73,7 +73,7 @@
bool redoLoop;
public:
static char ID; // Pass ID, replacement for typeid
- LoopUnswitch(bool Os = false) :
+ explicit LoopUnswitch(bool Os = false) :
LoopPass((intptr_t)&ID), OptimizeForSize(Os), redoLoop(false) {}
bool runOnLoop(Loop *L, LPPassManager &LPM);
Modified: llvm/trunk/lib/Transforms/Scalar/ScalarReplAggregates.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/ScalarReplAggregates.cpp?rev=40673&r1=40672&r2=40673&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/ScalarReplAggregates.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/ScalarReplAggregates.cpp Wed Aug 1 10:32:29 2007
@@ -48,7 +48,7 @@
namespace {
struct VISIBILITY_HIDDEN SROA : public FunctionPass {
static char ID; // Pass identification, replacement for typeid
- SROA(signed T = -1) : FunctionPass((intptr_t)&ID) {
+ explicit SROA(signed T = -1) : FunctionPass((intptr_t)&ID) {
if (T == -1)
SRThreshold = 128;
else
Modified: llvm/trunk/lib/Transforms/Utils/LowerAllocations.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/LowerAllocations.cpp?rev=40673&r1=40672&r2=40673&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/LowerAllocations.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/LowerAllocations.cpp Wed Aug 1 10:32:29 2007
@@ -37,7 +37,7 @@
bool LowerMallocArgToInteger;
public:
static char ID; // Pass ID, replacement for typeid
- LowerAllocations(bool LowerToInt = false)
+ explicit LowerAllocations(bool LowerToInt = false)
: BasicBlockPass((intptr_t)&ID), MallocFunc(0), FreeFunc(0),
LowerMallocArgToInteger(LowerToInt) {}
Modified: llvm/trunk/lib/Transforms/Utils/LowerInvoke.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/LowerInvoke.cpp?rev=40673&r1=40672&r2=40673&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/LowerInvoke.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/LowerInvoke.cpp Wed Aug 1 10:32:29 2007
@@ -76,8 +76,8 @@
public:
static char ID; // Pass identification, replacement for typeid
- LowerInvoke(const TargetLowering *tli = NULL) : FunctionPass((intptr_t)&ID),
- TLI(tli) { }
+ explicit LowerInvoke(const TargetLowering *tli = NULL)
+ : FunctionPass((intptr_t)&ID), TLI(tli) { }
bool doInitialization(Module &M);
bool runOnFunction(Function &F);
Modified: llvm/trunk/lib/Transforms/Utils/LowerSelect.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/LowerSelect.cpp?rev=40673&r1=40672&r2=40673&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/LowerSelect.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/LowerSelect.cpp Wed Aug 1 10:32:29 2007
@@ -34,7 +34,7 @@
bool OnlyFP; // Only lower FP select instructions?
public:
static char ID; // Pass identification, replacement for typeid
- LowerSelect(bool onlyfp = false) : FunctionPass((intptr_t)&ID),
+ explicit LowerSelect(bool onlyfp = false) : FunctionPass((intptr_t)&ID),
OnlyFP(onlyfp) {}
virtual void getAnalysisUsage(AnalysisUsage &AU) const {
More information about the llvm-commits
mailing list