[llvm-commits] [llvm] r45034 - in /llvm/trunk: include/llvm/ADT/StringMap.h include/llvm/ExecutionEngine/ExecutionEngine.h include/llvm/ExecutionEngine/GenericValue.h lib/Analysis/IPA/Andersens.cpp lib/CodeGen/CollectorMetadata.cpp lib/CodeGen/ELFWriter.cpp lib/CodeGen/SimpleRegisterCoalescing.h lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
Dan Gohman
djg at cray.com
Fri Dec 14 07:41:37 PST 2007
Author: djg
Date: Fri Dec 14 09:41:34 2007
New Revision: 45034
URL: http://llvm.org/viewvc/llvm-project?rev=45034&view=rev
Log:
Add explicit keywords, and fix a minor typo that they uncovered.
Modified:
llvm/trunk/include/llvm/ADT/StringMap.h
llvm/trunk/include/llvm/ExecutionEngine/ExecutionEngine.h
llvm/trunk/include/llvm/ExecutionEngine/GenericValue.h
llvm/trunk/lib/Analysis/IPA/Andersens.cpp
llvm/trunk/lib/CodeGen/CollectorMetadata.cpp
llvm/trunk/lib/CodeGen/ELFWriter.cpp
llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.h
llvm/trunk/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
Modified: llvm/trunk/include/llvm/ADT/StringMap.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/StringMap.h?rev=45034&r1=45033&r2=45034&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/StringMap.h (original)
+++ llvm/trunk/include/llvm/ADT/StringMap.h Fri Dec 14 09:41:34 2007
@@ -389,8 +389,8 @@
template<typename ValueTy>
class StringMapIterator : public StringMapConstIterator<ValueTy> {
public:
- StringMapIterator(StringMapImpl::ItemBucket *Bucket,
- bool NoAdvance = false)
+ explicit StringMapIterator(StringMapImpl::ItemBucket *Bucket,
+ bool NoAdvance = false)
: StringMapConstIterator<ValueTy>(Bucket, NoAdvance) {
}
StringMapEntry<ValueTy> &operator*() const {
Modified: llvm/trunk/include/llvm/ExecutionEngine/ExecutionEngine.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/ExecutionEngine.h?rev=45034&r1=45033&r2=45034&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ExecutionEngine/ExecutionEngine.h (original)
+++ llvm/trunk/include/llvm/ExecutionEngine/ExecutionEngine.h Fri Dec 14 09:41:34 2007
@@ -248,7 +248,7 @@
}
protected:
- ExecutionEngine(ModuleProvider *P);
+ explicit ExecutionEngine(ModuleProvider *P);
void emitGlobals();
Modified: llvm/trunk/include/llvm/ExecutionEngine/GenericValue.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ExecutionEngine/GenericValue.h?rev=45034&r1=45033&r2=45034&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ExecutionEngine/GenericValue.h (original)
+++ llvm/trunk/include/llvm/ExecutionEngine/GenericValue.h Fri Dec 14 09:41:34 2007
@@ -34,7 +34,7 @@
APInt IntVal; // also used for long doubles
GenericValue() : DoubleVal(0.0), IntVal(1,0) {}
- GenericValue(void *V) : PointerVal(V), IntVal(1,0) { }
+ explicit GenericValue(void *V) : PointerVal(V), IntVal(1,0) { }
};
inline GenericValue PTOGV(void *P) { return GenericValue(P); }
Modified: llvm/trunk/lib/Analysis/IPA/Andersens.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/IPA/Andersens.cpp?rev=45034&r1=45033&r2=45034&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/IPA/Andersens.cpp (original)
+++ llvm/trunk/lib/Analysis/IPA/Andersens.cpp Fri Dec 14 09:41:34 2007
@@ -246,7 +246,7 @@
// Used for work list prioritization.
unsigned Timestamp;
- Node(bool direct = true) :
+ explicit Node(bool direct = true) :
Val(0), Edges(0), PointsTo(0), OldPointsTo(0),
PointerEquivLabel(0), LocationEquivLabel(0), PredEdges(0),
ImplicitPredEdges(0), PointedToBy(0), NumInEdges(0),
Modified: llvm/trunk/lib/CodeGen/CollectorMetadata.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/CollectorMetadata.cpp?rev=45034&r1=45033&r2=45034&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/CollectorMetadata.cpp (original)
+++ llvm/trunk/lib/CodeGen/CollectorMetadata.cpp Fri Dec 14 09:41:34 2007
@@ -30,7 +30,7 @@
std::ostream &OS;
public:
- Printer(std::ostream &OS = *cerr);
+ explicit Printer(std::ostream &OS = *cerr);
const char *getPassName() const;
void getAnalysisUsage(AnalysisUsage &AU) const;
Modified: llvm/trunk/lib/CodeGen/ELFWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/ELFWriter.cpp?rev=45034&r1=45033&r2=45034&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/ELFWriter.cpp (original)
+++ llvm/trunk/lib/CodeGen/ELFWriter.cpp Fri Dec 14 09:41:34 2007
@@ -72,7 +72,7 @@
std::vector<unsigned char> *OutBuffer;
size_t FnStart;
public:
- ELFCodeEmitter(ELFWriter &ew) : EW(ew), TM(EW.TM), OutBuffer(0) {}
+ explicit ELFCodeEmitter(ELFWriter &ew) : EW(ew), TM(EW.TM), OutBuffer(0) {}
void startFunction(MachineFunction &F);
bool finishFunction(MachineFunction &F);
Modified: llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.h?rev=45034&r1=45033&r2=45034&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.h (original)
+++ llvm/trunk/lib/CodeGen/SimpleRegisterCoalescing.h Fri Dec 14 09:41:34 2007
@@ -48,7 +48,7 @@
///
struct CopyRecSort : public std::binary_function<CopyRec,CopyRec,bool> {
JoinPriorityQueue<CopyRecSort> *JPQ;
- CopyRecSort(JoinPriorityQueue<CopyRecSort> *jpq) : JPQ(jpq) {}
+ explicit CopyRecSort(JoinPriorityQueue<CopyRecSort> *jpq) : JPQ(jpq) {}
CopyRecSort(const CopyRecSort &RHS) : JPQ(RHS.JPQ) {}
bool operator()(CopyRec left, CopyRec right) const;
};
@@ -61,7 +61,8 @@
std::priority_queue<CopyRec, std::vector<CopyRec>, SF> Queue;
public:
- JoinPriorityQueue(SimpleRegisterCoalescing *rc) : Rc(rc), Queue(SF(this)) {}
+ explicit JoinPriorityQueue(SimpleRegisterCoalescing *rc)
+ : Rc(rc), Queue(SF(this)) {}
bool empty() const { return Queue.empty(); }
void push(CopyRec R) { Queue.push(R); }
Modified: llvm/trunk/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp?rev=45034&r1=45033&r2=45034&view=diff
==============================================================================
--- llvm/trunk/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp (original)
+++ llvm/trunk/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp Fri Dec 14 09:41:34 2007
@@ -653,7 +653,7 @@
// char *fgets(char *s, int n, FILE *stream);
GenericValue lle_X_fgets(FunctionType *FT, const vector<GenericValue> &Args) {
assert(Args.size() == 3);
- return GVTOP(fgets((char*)GVTOP(Args[0]), Args[1].IntVal.getZExtValue(),
+ return PTOGV(fgets((char*)GVTOP(Args[0]), Args[1].IntVal.getZExtValue(),
getFILE(GVTOP(Args[2]))));
}
More information about the llvm-commits
mailing list