aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2007-12-14 15:41:34 +0000
committerDan Gohman <gohman@apple.com>2007-12-14 15:41:34 +0000
commitded2b0d0fb0d4fa09198e3d05da529d2c97214c3 (patch)
treec7889a60dd3e88fd586f792cf4ae9474fb705576 /lib
parent064a57a77d1a146a0efa98bdf64b0355dd9c391f (diff)
downloadexternal_llvm-ded2b0d0fb0d4fa09198e3d05da529d2c97214c3.zip
external_llvm-ded2b0d0fb0d4fa09198e3d05da529d2c97214c3.tar.gz
external_llvm-ded2b0d0fb0d4fa09198e3d05da529d2c97214c3.tar.bz2
Add explicit keywords, and fix a minor typo that they uncovered.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45034 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Analysis/IPA/Andersens.cpp2
-rw-r--r--lib/CodeGen/CollectorMetadata.cpp2
-rw-r--r--lib/CodeGen/ELFWriter.cpp2
-rw-r--r--lib/CodeGen/SimpleRegisterCoalescing.h5
-rw-r--r--lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp2
5 files changed, 7 insertions, 6 deletions
diff --git a/lib/Analysis/IPA/Andersens.cpp b/lib/Analysis/IPA/Andersens.cpp
index cc7ad7e..474781f 100644
--- a/lib/Analysis/IPA/Andersens.cpp
+++ b/lib/Analysis/IPA/Andersens.cpp
@@ -246,7 +246,7 @@ namespace {
// 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),
diff --git a/lib/CodeGen/CollectorMetadata.cpp b/lib/CodeGen/CollectorMetadata.cpp
index 5734939..43f3d43 100644
--- a/lib/CodeGen/CollectorMetadata.cpp
+++ b/lib/CodeGen/CollectorMetadata.cpp
@@ -30,7 +30,7 @@ namespace {
std::ostream &OS;
public:
- Printer(std::ostream &OS = *cerr);
+ explicit Printer(std::ostream &OS = *cerr);
const char *getPassName() const;
void getAnalysisUsage(AnalysisUsage &AU) const;
diff --git a/lib/CodeGen/ELFWriter.cpp b/lib/CodeGen/ELFWriter.cpp
index efdf029..d054adb 100644
--- a/lib/CodeGen/ELFWriter.cpp
+++ b/lib/CodeGen/ELFWriter.cpp
@@ -72,7 +72,7 @@ namespace llvm {
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);
diff --git a/lib/CodeGen/SimpleRegisterCoalescing.h b/lib/CodeGen/SimpleRegisterCoalescing.h
index c3b2895..fcdab4a 100644
--- a/lib/CodeGen/SimpleRegisterCoalescing.h
+++ b/lib/CodeGen/SimpleRegisterCoalescing.h
@@ -48,7 +48,7 @@ namespace llvm {
///
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 @@ namespace llvm {
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); }
diff --git a/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp b/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
index f45875f..4e9b77b 100644
--- a/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
+++ b/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp
@@ -653,7 +653,7 @@ GenericValue lle_X_fwrite(FunctionType *FT, const vector<GenericValue> &Args) {
// 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]))));
}