mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-14 14:24:05 +00:00
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
This commit is contained in:
@ -389,7 +389,7 @@ private:
|
|||||||
template<typename ValueTy>
|
template<typename ValueTy>
|
||||||
class StringMapIterator : public StringMapConstIterator<ValueTy> {
|
class StringMapIterator : public StringMapConstIterator<ValueTy> {
|
||||||
public:
|
public:
|
||||||
StringMapIterator(StringMapImpl::ItemBucket *Bucket,
|
explicit StringMapIterator(StringMapImpl::ItemBucket *Bucket,
|
||||||
bool NoAdvance = false)
|
bool NoAdvance = false)
|
||||||
: StringMapConstIterator<ValueTy>(Bucket, NoAdvance) {
|
: StringMapConstIterator<ValueTy>(Bucket, NoAdvance) {
|
||||||
}
|
}
|
||||||
|
@ -248,7 +248,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
ExecutionEngine(ModuleProvider *P);
|
explicit ExecutionEngine(ModuleProvider *P);
|
||||||
|
|
||||||
void emitGlobals();
|
void emitGlobals();
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ struct GenericValue {
|
|||||||
APInt IntVal; // also used for long doubles
|
APInt IntVal; // also used for long doubles
|
||||||
|
|
||||||
GenericValue() : DoubleVal(0.0), IntVal(1,0) {}
|
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); }
|
inline GenericValue PTOGV(void *P) { return GenericValue(P); }
|
||||||
|
@ -246,7 +246,7 @@ namespace {
|
|||||||
// Used for work list prioritization.
|
// Used for work list prioritization.
|
||||||
unsigned Timestamp;
|
unsigned Timestamp;
|
||||||
|
|
||||||
Node(bool direct = true) :
|
explicit Node(bool direct = true) :
|
||||||
Val(0), Edges(0), PointsTo(0), OldPointsTo(0),
|
Val(0), Edges(0), PointsTo(0), OldPointsTo(0),
|
||||||
PointerEquivLabel(0), LocationEquivLabel(0), PredEdges(0),
|
PointerEquivLabel(0), LocationEquivLabel(0), PredEdges(0),
|
||||||
ImplicitPredEdges(0), PointedToBy(0), NumInEdges(0),
|
ImplicitPredEdges(0), PointedToBy(0), NumInEdges(0),
|
||||||
|
@ -30,7 +30,7 @@ namespace {
|
|||||||
std::ostream &OS;
|
std::ostream &OS;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Printer(std::ostream &OS = *cerr);
|
explicit Printer(std::ostream &OS = *cerr);
|
||||||
|
|
||||||
const char *getPassName() const;
|
const char *getPassName() const;
|
||||||
void getAnalysisUsage(AnalysisUsage &AU) const;
|
void getAnalysisUsage(AnalysisUsage &AU) const;
|
||||||
|
@ -72,7 +72,7 @@ namespace llvm {
|
|||||||
std::vector<unsigned char> *OutBuffer;
|
std::vector<unsigned char> *OutBuffer;
|
||||||
size_t FnStart;
|
size_t FnStart;
|
||||||
public:
|
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);
|
void startFunction(MachineFunction &F);
|
||||||
bool finishFunction(MachineFunction &F);
|
bool finishFunction(MachineFunction &F);
|
||||||
|
@ -48,7 +48,7 @@ namespace llvm {
|
|||||||
///
|
///
|
||||||
struct CopyRecSort : public std::binary_function<CopyRec,CopyRec,bool> {
|
struct CopyRecSort : public std::binary_function<CopyRec,CopyRec,bool> {
|
||||||
JoinPriorityQueue<CopyRecSort> *JPQ;
|
JoinPriorityQueue<CopyRecSort> *JPQ;
|
||||||
CopyRecSort(JoinPriorityQueue<CopyRecSort> *jpq) : JPQ(jpq) {}
|
explicit CopyRecSort(JoinPriorityQueue<CopyRecSort> *jpq) : JPQ(jpq) {}
|
||||||
CopyRecSort(const CopyRecSort &RHS) : JPQ(RHS.JPQ) {}
|
CopyRecSort(const CopyRecSort &RHS) : JPQ(RHS.JPQ) {}
|
||||||
bool operator()(CopyRec left, CopyRec right) const;
|
bool operator()(CopyRec left, CopyRec right) const;
|
||||||
};
|
};
|
||||||
@ -61,7 +61,8 @@ namespace llvm {
|
|||||||
std::priority_queue<CopyRec, std::vector<CopyRec>, SF> Queue;
|
std::priority_queue<CopyRec, std::vector<CopyRec>, SF> Queue;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
JoinPriorityQueue(SimpleRegisterCoalescing *rc) : Rc(rc), Queue(SF(this)) {}
|
explicit JoinPriorityQueue(SimpleRegisterCoalescing *rc)
|
||||||
|
: Rc(rc), Queue(SF(this)) {}
|
||||||
|
|
||||||
bool empty() const { return Queue.empty(); }
|
bool empty() const { return Queue.empty(); }
|
||||||
void push(CopyRec R) { Queue.push(R); }
|
void push(CopyRec R) { Queue.push(R); }
|
||||||
|
@ -653,7 +653,7 @@ GenericValue lle_X_fwrite(FunctionType *FT, const vector<GenericValue> &Args) {
|
|||||||
// char *fgets(char *s, int n, FILE *stream);
|
// char *fgets(char *s, int n, FILE *stream);
|
||||||
GenericValue lle_X_fgets(FunctionType *FT, const vector<GenericValue> &Args) {
|
GenericValue lle_X_fgets(FunctionType *FT, const vector<GenericValue> &Args) {
|
||||||
assert(Args.size() == 3);
|
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]))));
|
getFILE(GVTOP(Args[2]))));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user