diff options
author | Chris Lattner <sabre@nondot.org> | 2006-05-24 17:04:05 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2006-05-24 17:04:05 +0000 |
commit | aa2372562e39758d0b8fca392fd636fe55b23cc9 (patch) | |
tree | fea9f96191ae654bc163e553eea13431887046ca /llvm/lib | |
parent | 5114596467e0b7024b549c27590631337914d6b0 (diff) | |
download | bcm5719-llvm-aa2372562e39758d0b8fca392fd636fe55b23cc9.tar.gz bcm5719-llvm-aa2372562e39758d0b8fca392fd636fe55b23cc9.zip |
Patches to make the LLVM sources more -pedantic clean. Patch provided
by Anton Korobeynikov! This is a step towards closing PR786.
llvm-svn: 28447
Diffstat (limited to 'llvm/lib')
29 files changed, 31 insertions, 31 deletions
diff --git a/llvm/lib/Analysis/DataStructure/DataStructure.cpp b/llvm/lib/Analysis/DataStructure/DataStructure.cpp index f6fca1fa961..4e326545cc5 100644 --- a/llvm/lib/Analysis/DataStructure/DataStructure.cpp +++ b/llvm/lib/Analysis/DataStructure/DataStructure.cpp @@ -43,7 +43,7 @@ namespace { DSAFieldLimit("dsa-field-limit", cl::Hidden, cl::desc("Number of fields to track before collapsing a node"), cl::init(256)); -}; +} #if 0 #define TIME_REGION(VARNAME, DESC) \ diff --git a/llvm/lib/Analysis/IPA/Andersens.cpp b/llvm/lib/Analysis/IPA/Andersens.cpp index 877cf2ebd9f..11886936c86 100644 --- a/llvm/lib/Analysis/IPA/Andersens.cpp +++ b/llvm/lib/Analysis/IPA/Andersens.cpp @@ -192,7 +192,7 @@ namespace { enum { UniversalSet = 0, NullPtr = 1, - NullObject = 2, + NullObject = 2 }; public: diff --git a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp index 8d51f7f9384..8c6a7b5fc7b 100644 --- a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp +++ b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp @@ -59,7 +59,7 @@ namespace { EnableJoining("join-liveintervals", cl::desc("Join compatible live intervals"), cl::init(true)); -}; +} void LiveIntervals::getAnalysisUsage(AnalysisUsage &AU) const { diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index 3fbfbf927a3..979305fa41a 100644 --- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp @@ -65,7 +65,7 @@ class SelectionDAGLegalize { enum LegalizeAction { Legal, // The target natively supports this operation. Promote, // This operation should be executed in a larger type. - Expand, // Try to expand this to other ops, otherwise use a libcall. + Expand // Try to expand this to other ops, otherwise use a libcall. }; /// ValueTypeActions - This is a bitvector that contains two bits for each diff --git a/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp b/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp index 4bd20479ff7..9e98a976f03 100644 --- a/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp +++ b/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp @@ -60,7 +60,7 @@ namespace { RegisterPass<TwoAddressInstructionPass> X("twoaddressinstruction", "Two-Address instruction pass"); -}; +} const PassInfo *llvm::TwoAddressInstructionPassID = X.getPassInfo(); diff --git a/llvm/lib/Support/Compressor.cpp b/llvm/lib/Support/Compressor.cpp index 1233cf4f0a0..99bfd676c05 100644 --- a/llvm/lib/Support/Compressor.cpp +++ b/llvm/lib/Support/Compressor.cpp @@ -23,7 +23,7 @@ using namespace llvm; enum CompressionTypes { COMP_TYPE_NONE = '0', - COMP_TYPE_BZIP2 = '2', + COMP_TYPE_BZIP2 = '2' }; static int getdata(char*& buffer, size_t &size, diff --git a/llvm/lib/Support/IsInf.cpp b/llvm/lib/Support/IsInf.cpp index 5160110bc2e..39c11cd7a66 100644 --- a/llvm/lib/Support/IsInf.cpp +++ b/llvm/lib/Support/IsInf.cpp @@ -42,4 +42,4 @@ namespace llvm { int IsInf (float f) { return isinf (f); } int IsInf (double d) { return isinf (d); } -}; // end namespace llvm; +} // end namespace llvm; diff --git a/llvm/lib/Support/IsNAN.cpp b/llvm/lib/Support/IsNAN.cpp index 3300b7b47f6..2ed2b284c7d 100644 --- a/llvm/lib/Support/IsNAN.cpp +++ b/llvm/lib/Support/IsNAN.cpp @@ -31,4 +31,4 @@ namespace llvm { int IsNAN (float f) { return isnan (f); } int IsNAN (double d) { return isnan (d); } -}; // end namespace llvm; +} // end namespace llvm; diff --git a/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp b/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp index 0a489781310..7cf7dd37a4a 100644 --- a/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp +++ b/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp @@ -31,7 +31,7 @@ using namespace llvm; namespace ARMISD { enum { FIRST_NUMBER = ISD::BUILTIN_OP_END+ARM::INSTRUCTION_LIST_END, - RET_FLAG, + RET_FLAG }; } diff --git a/llvm/lib/Target/Alpha/AlphaISelLowering.h b/llvm/lib/Target/Alpha/AlphaISelLowering.h index 569fa74a8cf..d6886fcc69e 100644 --- a/llvm/lib/Target/Alpha/AlphaISelLowering.h +++ b/llvm/lib/Target/Alpha/AlphaISelLowering.h @@ -42,7 +42,7 @@ namespace llvm { CALL, /// DIVCALL - used for special library calls for div and rem - DivCall, + DivCall }; } diff --git a/llvm/lib/Target/Alpha/AlphaRelocations.h b/llvm/lib/Target/Alpha/AlphaRelocations.h index 59b97650858..c532f21f161 100644 --- a/llvm/lib/Target/Alpha/AlphaRelocations.h +++ b/llvm/lib/Target/Alpha/AlphaRelocations.h @@ -23,7 +23,7 @@ namespace llvm { reloc_gprellow, reloc_gprelhigh, reloc_gpdist, - reloc_bsr, + reloc_bsr }; } } diff --git a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp index 1e6c1e5c787..850b4127ac9 100644 --- a/llvm/lib/Target/PowerPC/PPCISelLowering.cpp +++ b/llvm/lib/Target/PowerPC/PPCISelLowering.cpp @@ -1748,7 +1748,7 @@ static SDOperand GeneratePerfectShuffle(unsigned PFEntry, SDOperand LHS, OP_VSPLTISW3, OP_VSLDOI4, OP_VSLDOI8, - OP_VSLDOI12, + OP_VSLDOI12 }; if (OpNum == OP_COPY) { diff --git a/llvm/lib/Target/PowerPC/PPCInstrInfo.h b/llvm/lib/Target/PowerPC/PPCInstrInfo.h index 857d42b71b2..25551fb6c29 100644 --- a/llvm/lib/Target/PowerPC/PPCInstrInfo.h +++ b/llvm/lib/Target/PowerPC/PPCInstrInfo.h @@ -44,7 +44,7 @@ enum { /// PPC970_Mask/Shift - This is a bitmask that selects the pipeline type that /// an instruction is issued to. PPC970_Shift = 3, - PPC970_Mask = 0x07 << PPC970_Shift, + PPC970_Mask = 0x07 << PPC970_Shift }; enum PPC970_Unit { /// These are the various PPC970 execution unit pipelines. Each instruction @@ -56,7 +56,7 @@ enum PPC970_Unit { PPC970_CRU = 4 << PPC970_Shift, // Control Register Unit PPC970_VALU = 5 << PPC970_Shift, // Vector ALU PPC970_VPERM = 6 << PPC970_Shift, // Vector Permute Unit - PPC970_BRU = 7 << PPC970_Shift, // Branch Unit + PPC970_BRU = 7 << PPC970_Shift // Branch Unit }; } diff --git a/llvm/lib/Target/PowerPC/PPCJITInfo.cpp b/llvm/lib/Target/PowerPC/PPCJITInfo.cpp index a6d630efa2c..6ee10d78b63 100644 --- a/llvm/lib/Target/PowerPC/PPCJITInfo.cpp +++ b/llvm/lib/Target/PowerPC/PPCJITInfo.cpp @@ -165,7 +165,7 @@ PPCJITInfo::getLazyResolverFunction(JITCompilerFn Fn) { void *PPCJITInfo::emitFunctionStub(void *Fn, MachineCodeEmitter &MCE) { // If this is just a call to an external function, emit a branch instead of a // call. The code is the same except for one bit of the last instruction. - if (Fn != PPC32CompilationCallback) { + if (Fn != (void*)PPC32CompilationCallback) { MCE.startFunctionStub(4*4); void *Addr = (void*)(intptr_t)MCE.getCurrentPCValue(); MCE.emitWordBE(0); diff --git a/llvm/lib/Target/PowerPC/PPCRelocations.h b/llvm/lib/Target/PowerPC/PPCRelocations.h index 77c351980cf..20d747b06d5 100644 --- a/llvm/lib/Target/PowerPC/PPCRelocations.h +++ b/llvm/lib/Target/PowerPC/PPCRelocations.h @@ -50,7 +50,7 @@ namespace llvm { // relocated to point to a POINTER to the indicated global. The low-16 // bits of the instruction are rewritten with the low 16-bits of the // address of the pointer. - reloc_absolute_ptr_low, + reloc_absolute_ptr_low }; } } diff --git a/llvm/lib/Target/Sparc/Sparc.h b/llvm/lib/Target/Sparc/Sparc.h index 084bfe3987f..c2ae18d9c4f 100644 --- a/llvm/lib/Target/Sparc/Sparc.h +++ b/llvm/lib/Target/Sparc/Sparc.h @@ -75,7 +75,7 @@ namespace llvm { FCC_UGE = 12+16, // Unordered or Greater or Equal FCC_LE = 13+16, // Less or Equal FCC_ULE = 14+16, // Unordered or Less or Equal - FCC_O = 15+16, // Ordered + FCC_O = 15+16 // Ordered }; } diff --git a/llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp b/llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp index 123b86aa294..25f6e234a2f 100644 --- a/llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp +++ b/llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp @@ -48,7 +48,7 @@ namespace SPISD { ITOF, // Int to FP within a FP register. CALL, // A call instruction. - RET_FLAG, // Return with a flag operand. + RET_FLAG // Return with a flag operand. }; } diff --git a/llvm/lib/Target/Sparc/SparcInstrInfo.h b/llvm/lib/Target/Sparc/SparcInstrInfo.h index 3dd8b8e8b3f..166793e2e04 100644 --- a/llvm/lib/Target/Sparc/SparcInstrInfo.h +++ b/llvm/lib/Target/Sparc/SparcInstrInfo.h @@ -29,7 +29,7 @@ namespace SPII { Store = (1<<2), DelaySlot = (1<<3) }; -}; +} class SparcInstrInfo : public TargetInstrInfo { const SparcRegisterInfo RI; diff --git a/llvm/lib/Target/Sparc/SparcSubtarget.cpp b/llvm/lib/Target/Sparc/SparcSubtarget.cpp index beda79d49b0..9940fcf3b1d 100644 --- a/llvm/lib/Target/Sparc/SparcSubtarget.cpp +++ b/llvm/lib/Target/Sparc/SparcSubtarget.cpp @@ -40,4 +40,4 @@ SparcSubtarget::SparcSubtarget(const Module &M, const std::string &FS) { // Unless explicitly enabled, disable the V9 instructions. if (!EnableV9) IsV9 = false; -}; +} diff --git a/llvm/lib/Target/TargetMachine.cpp b/llvm/lib/Target/TargetMachine.cpp index bf70d12a6b8..c9e92fa8540 100644 --- a/llvm/lib/Target/TargetMachine.cpp +++ b/llvm/lib/Target/TargetMachine.cpp @@ -28,7 +28,7 @@ namespace llvm { bool UnsafeFPMath; bool FiniteOnlyFPMathOption; Reloc::Model RelocationModel; -}; +} namespace { cl::opt<bool, true> PrintCode("print-machineinstrs", cl::desc("Print generated machine code"), @@ -70,7 +70,7 @@ namespace { clEnumValN(Reloc::DynamicNoPIC, "dynamic-no-pic", "Relocatable external references, non-relocatable code"), clEnumValEnd)); -}; +} //--------------------------------------------------------------------------- // TargetMachine Class diff --git a/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp b/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp index 50c42ec0406..b53748ab75d 100644 --- a/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp +++ b/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp @@ -47,7 +47,7 @@ namespace { struct X86ISelAddressMode { enum { RegBase, - FrameIndexBase, + FrameIndexBase } BaseType; struct { // This is really a union, discriminated by BaseType! diff --git a/llvm/lib/Target/X86/X86ISelLowering.h b/llvm/lib/Target/X86/X86ISelLowering.h index 9269daf9abf..38aa227c957 100644 --- a/llvm/lib/Target/X86/X86ISelLowering.h +++ b/llvm/lib/Target/X86/X86ISelLowering.h @@ -156,7 +156,7 @@ namespace llvm { /// PINSRW - Insert the lower 16-bits of a 32-bit value to a vector, /// corresponds to X86::PINSRW. - PINSRW, + PINSRW }; // X86 specific condition code. These correspond to X86_*_COND in diff --git a/llvm/lib/Target/X86/X86InstrBuilder.h b/llvm/lib/Target/X86/X86InstrBuilder.h index f3e1c28e4d8..c0fa58debff 100644 --- a/llvm/lib/Target/X86/X86InstrBuilder.h +++ b/llvm/lib/Target/X86/X86InstrBuilder.h @@ -35,7 +35,7 @@ namespace llvm { struct X86AddressMode { enum { RegBase, - FrameIndexBase, + FrameIndexBase } BaseType; union { diff --git a/llvm/lib/Target/X86/X86InstrInfo.h b/llvm/lib/Target/X86/X86InstrInfo.h index d6dfae14e6b..b49c351d68f 100644 --- a/llvm/lib/Target/X86/X86InstrInfo.h +++ b/llvm/lib/Target/X86/X86InstrInfo.h @@ -162,7 +162,7 @@ namespace X86II { SpecialFP = 7 << FPTypeShift, OpcodeShift = 16, - OpcodeMask = 0xFF << OpcodeShift, + OpcodeMask = 0xFF << OpcodeShift // Bits 25 -> 31 are unused }; } diff --git a/llvm/lib/Target/X86/X86JITInfo.cpp b/llvm/lib/Target/X86/X86JITInfo.cpp index 3d1222128af..6f83651c184 100644 --- a/llvm/lib/Target/X86/X86JITInfo.cpp +++ b/llvm/lib/Target/X86/X86JITInfo.cpp @@ -167,7 +167,7 @@ X86JITInfo::getLazyResolverFunction(JITCompilerFn F) { } void *X86JITInfo::emitFunctionStub(void *Fn, MachineCodeEmitter &MCE) { - if (Fn != X86CompilationCallback) { + if (Fn != (void*)X86CompilationCallback) { MCE.startFunctionStub(5); MCE.emitByte(0xE9); MCE.emitWordLE((intptr_t)Fn-MCE.getCurrentPCValue()-4); diff --git a/llvm/lib/Target/X86/X86Relocations.h b/llvm/lib/Target/X86/X86Relocations.h index 7a5f1a68844..bc1efabc7ab 100644 --- a/llvm/lib/Target/X86/X86Relocations.h +++ b/llvm/lib/Target/X86/X86Relocations.h @@ -25,7 +25,7 @@ namespace llvm { // reloc_absolute_word - Absolute relocation, just add the relocated value // to the value already in memory. - reloc_absolute_word = 1, + reloc_absolute_word = 1 }; } } diff --git a/llvm/lib/Transforms/Instrumentation/RSProfiling.cpp b/llvm/lib/Transforms/Instrumentation/RSProfiling.cpp index 5918d7ee997..31c01ee886d 100644 --- a/llvm/lib/Transforms/Instrumentation/RSProfiling.cpp +++ b/llvm/lib/Transforms/Instrumentation/RSProfiling.cpp @@ -162,7 +162,7 @@ namespace { RegisterOpt<ProfilerRS> X("insert-rs-profiling-framework", "Insert random sampling instrumentation framework"); -}; +} //Local utilities static void ReplacePhiPred(BasicBlock* btarget, diff --git a/llvm/lib/Transforms/Instrumentation/RSProfiling.h b/llvm/lib/Transforms/Instrumentation/RSProfiling.h index 304ce08f7b3..e07db004523 100644 --- a/llvm/lib/Transforms/Instrumentation/RSProfiling.h +++ b/llvm/lib/Transforms/Instrumentation/RSProfiling.h @@ -26,4 +26,4 @@ namespace llvm { void IncrementCounterInBlock(BasicBlock *BB, unsigned CounterNum, GlobalValue *CounterArray); }; -}; +} diff --git a/llvm/lib/VMCore/Constants.cpp b/llvm/lib/VMCore/Constants.cpp index 22a14fb14ef..d6e524e54ea 100644 --- a/llvm/lib/VMCore/Constants.cpp +++ b/llvm/lib/VMCore/Constants.cpp @@ -529,7 +529,7 @@ bool ConstantFP::isValueValidForType(const Type *Ty, double Val) { case Type::DoubleTyID: return true; // This is the largest type... } -}; +} //===----------------------------------------------------------------------===// // Factory Function Implementation |