Fix a bunch of little errors that Clang complains about when its being pedantic

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91764 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Douglas Gregor 2009-12-19 07:05:23 +00:00
parent 0ebc6ce974
commit cabdd7425d
10 changed files with 24 additions and 24 deletions

View File

@ -76,7 +76,7 @@ public:
virtual uint64_t getMaxFileSize() const { virtual uint64_t getMaxFileSize() const {
assert(0 && "Invalid getMaxFileSize call!"); assert(0 && "Invalid getMaxFileSize call!");
return 0; return 0;
}; }
/// @name Assembler Backend Support /// @name Assembler Backend Support
/// @{ /// @{

View File

@ -236,7 +236,7 @@ namespace {
const MCSection *S; const MCSection *S;
unsigned Alignment; unsigned Alignment;
SmallVector<unsigned, 4> CPEs; SmallVector<unsigned, 4> CPEs;
SectionCPs(const MCSection *s, unsigned a) : S(s), Alignment(a) {}; SectionCPs(const MCSection *s, unsigned a) : S(s), Alignment(a) {}
}; };
} }

View File

@ -82,14 +82,14 @@ namespace llvm {
const GlobalValue *getGlobalValue() const { const GlobalValue *getGlobalValue() const {
assert(SourceType == isGV && "This is not a global value"); assert(SourceType == isGV && "This is not a global value");
return Source.GV; return Source.GV;
}; }
// getExternalSym - If this is an external symbol which originated the // getExternalSym - If this is an external symbol which originated the
// elf symbol, return a reference to it. // elf symbol, return a reference to it.
const char *getExternalSymbol() const { const char *getExternalSymbol() const {
assert(SourceType == isExtSym && "This is not an external symbol"); assert(SourceType == isExtSym && "This is not an external symbol");
return Source.Ext; return Source.Ext;
}; }
// getGV - From a global value return a elf symbol to represent it // getGV - From a global value return a elf symbol to represent it
static ELFSym *getGV(const GlobalValue *GV, unsigned Bind, static ELFSym *getGV(const GlobalValue *GV, unsigned Bind,

View File

@ -298,7 +298,7 @@ public:
for (ConstAdjEdgeIterator adjEdgeItr = adjEdgesBegin(node1Itr), for (ConstAdjEdgeIterator adjEdgeItr = adjEdgesBegin(node1Itr),
adjEdgeEnd = adjEdgesEnd(node1Itr); adjEdgeEnd = adjEdgesEnd(node1Itr);
adjEdgeItr != adjEdgesEnd; ++adjEdgeItr) { adjEdgeItr != adjEdgeEnd; ++adjEdgeItr) {
if ((getEdgeNode1Itr(*adjEdgeItr) == node2Itr) || if ((getEdgeNode1Itr(*adjEdgeItr) == node2Itr) ||
(getEdgeNode2Itr(*adjEdgeItr) == node2Itr)) { (getEdgeNode2Itr(*adjEdgeItr) == node2Itr)) {
return *adjEdgeItr; return *adjEdgeItr;

View File

@ -536,7 +536,7 @@ private:
else reductionFinished = true; else reductionFinished = true;
} }
}; }
void processR1() { void processR1() {

View File

@ -891,7 +891,7 @@ namespace {
const RALinScan &Allocator; const RALinScan &Allocator;
public: public:
WeightCompare(const RALinScan &Alloc) : Allocator(Alloc) {}; WeightCompare(const RALinScan &Alloc) : Allocator(Alloc) {}
typedef std::pair<unsigned, float> RegWeightPair; typedef std::pair<unsigned, float> RegWeightPair;
bool operator()(const RegWeightPair &LHS, const RegWeightPair &RHS) const { bool operator()(const RegWeightPair &LHS, const RegWeightPair &RHS) const {

View File

@ -33,7 +33,7 @@ namespace llvm {
MachineInstr *MI; MachineInstr *MI;
unsigned LoopDepth; unsigned LoopDepth;
CopyRec(MachineInstr *mi, unsigned depth) CopyRec(MachineInstr *mi, unsigned depth)
: MI(mi), LoopDepth(depth) {}; : MI(mi), LoopDepth(depth) {}
}; };
class SimpleRegisterCoalescing : public MachineFunctionPass, class SimpleRegisterCoalescing : public MachineFunctionPass,
@ -85,7 +85,7 @@ namespace llvm {
bool coalesceFunction(MachineFunction &mf, RegallocQuery &) { bool coalesceFunction(MachineFunction &mf, RegallocQuery &) {
// This runs as an independent pass, so don't do anything. // This runs as an independent pass, so don't do anything.
return false; return false;
}; }
/// print - Implement the dump method. /// print - Implement the dump method.
virtual void print(raw_ostream &O, const Module* = 0) const; virtual void print(raw_ostream &O, const Module* = 0) const;

View File

@ -78,7 +78,7 @@ namespace {
MachineBasicBlock::iterator MBBI; MachineBasicBlock::iterator MBBI;
bool Merged; bool Merged;
MemOpQueueEntry(int o, int p, MachineBasicBlock::iterator i) MemOpQueueEntry(int o, int p, MachineBasicBlock::iterator i)
: Offset(o), Position(p), MBBI(i), Merged(false) {}; : Offset(o), Position(p), MBBI(i), Merged(false) {}
}; };
typedef SmallVector<MemOpQueueEntry,8> MemOpQueue; typedef SmallVector<MemOpQueueEntry,8> MemOpQueue;
typedef MemOpQueue::iterator MemOpQueueIter; typedef MemOpQueue::iterator MemOpQueueIter;

View File

@ -102,21 +102,21 @@ public:
bool isMips1() const { return MipsArchVersion == Mips1; } bool isMips1() const { return MipsArchVersion == Mips1; }
bool isLittle() const { return IsLittle; } bool isLittle() const { return IsLittle; }
bool isFP64bit() const { return IsFP64bit; }; bool isFP64bit() const { return IsFP64bit; }
bool isGP64bit() const { return IsGP64bit; }; bool isGP64bit() const { return IsGP64bit; }
bool isGP32bit() const { return !IsGP64bit; }; bool isGP32bit() const { return !IsGP64bit; }
bool isSingleFloat() const { return IsSingleFloat; }; bool isSingleFloat() const { return IsSingleFloat; }
bool isNotSingleFloat() const { return !IsSingleFloat; }; bool isNotSingleFloat() const { return !IsSingleFloat; }
bool hasVFPU() const { return HasVFPU; }; bool hasVFPU() const { return HasVFPU; }
bool isLinux() const { return IsLinux; }; bool isLinux() const { return IsLinux; }
/// Features related to the presence of specific instructions. /// Features related to the presence of specific instructions.
bool hasSEInReg() const { return HasSEInReg; }; bool hasSEInReg() const { return HasSEInReg; }
bool hasCondMov() const { return HasCondMov; }; bool hasCondMov() const { return HasCondMov; }
bool hasMulDivAdd() const { return HasMulDivAdd; }; bool hasMulDivAdd() const { return HasMulDivAdd; }
bool hasMinMax() const { return HasMinMax; }; bool hasMinMax() const { return HasMinMax; }
bool hasSwap() const { return HasSwap; }; bool hasSwap() const { return HasSwap; }
bool hasBitCount() const { return HasBitCount; }; bool hasBitCount() const { return HasBitCount; }
}; };
} // End llvm namespace } // End llvm namespace

View File

@ -56,7 +56,7 @@ namespace {
// We don't modify the program, so we preserve all analyses // We don't modify the program, so we preserve all analyses
virtual void getAnalysisUsage(AnalysisUsage &AU) const { virtual void getAnalysisUsage(AnalysisUsage &AU) const {
AU.setPreservesAll(); AU.setPreservesAll();
}; }
}; };
} }