From ed45ad33b7bff47cea57fb1f7abecbd80d48e64c Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 22 Feb 2006 16:23:43 +0000 Subject: [PATCH] Make the LLVM headers "-ansi -pedantic -Wno-long-long" clean. Patch by Martin Partel! llvm-svn: 26313 --- include/llvm/ADT/BitSetVector.h | 2 +- include/llvm/ADT/PostOrderIterator.h | 1 + include/llvm/ADT/VectorExtras.h | 1 + include/llvm/Analysis/AliasAnalysis.h | 2 +- include/llvm/Analysis/DataStructure/DSGraph.h | 6 +++--- include/llvm/Analysis/DataStructure/DSNode.h | 2 +- include/llvm/Analysis/DataStructure/DSSupport.h | 2 +- include/llvm/Analysis/LinkAllAnalyses.h | 2 +- include/llvm/Bytecode/Archive.h | 2 +- include/llvm/Bytecode/Format.h | 2 +- include/llvm/CallingConv.h | 2 +- include/llvm/CodeGen/ELFWriter.h | 2 +- include/llvm/CodeGen/LiveIntervalAnalysis.h | 2 +- include/llvm/CodeGen/MachineInstr.h | 4 ++-- include/llvm/CodeGen/ScheduleDAG.h | 2 +- include/llvm/CodeGen/SelectionDAGNodes.h | 4 ++-- include/llvm/CodeGen/ValueTypes.h | 4 ++-- include/llvm/Linker.h | 2 +- include/llvm/PassAnalysisSupport.h | 2 ++ include/llvm/System/MappedFile.h | 2 +- include/llvm/System/Path.h | 2 +- include/llvm/System/TimeValue.h | 2 +- include/llvm/Target/MRegisterInfo.h | 2 +- include/llvm/Target/TargetLowering.h | 8 ++++---- include/llvm/Transforms/LinkAllPasses.h | 2 +- include/llvm/Transforms/RSProfiling.h | 2 +- 26 files changed, 35 insertions(+), 31 deletions(-) diff --git a/include/llvm/ADT/BitSetVector.h b/include/llvm/ADT/BitSetVector.h index 954bb79aa53..619bb0cf5f4 100644 --- a/include/llvm/ADT/BitSetVector.h +++ b/include/llvm/ADT/BitSetVector.h @@ -252,7 +252,7 @@ inline std::ostream& operator<< (std::ostream& O, const BitSetVector& bset) { bset.print(O); return O; -}; +} /// diff --git a/include/llvm/ADT/PostOrderIterator.h b/include/llvm/ADT/PostOrderIterator.h index 76d99b4a2d6..16f08657741 100644 --- a/include/llvm/ADT/PostOrderIterator.h +++ b/include/llvm/ADT/PostOrderIterator.h @@ -20,6 +20,7 @@ #include "llvm/ADT/iterator" #include #include +#include namespace llvm { diff --git a/include/llvm/ADT/VectorExtras.h b/include/llvm/ADT/VectorExtras.h index 56d65bb3728..bda2ae66fce 100644 --- a/include/llvm/ADT/VectorExtras.h +++ b/include/llvm/ADT/VectorExtras.h @@ -16,6 +16,7 @@ #define LLVM_ADT_VECTOREXTRAS_H #include +#include namespace llvm { diff --git a/include/llvm/Analysis/AliasAnalysis.h b/include/llvm/Analysis/AliasAnalysis.h index eff29719c72..1cce4ea3930 100644 --- a/include/llvm/Analysis/AliasAnalysis.h +++ b/include/llvm/Analysis/AliasAnalysis.h @@ -178,7 +178,7 @@ public: /// CallsThrough - Indirect calls are made through the specified function /// pointer. - CallsThrough, + CallsThrough }; }; diff --git a/include/llvm/Analysis/DataStructure/DSGraph.h b/include/llvm/Analysis/DataStructure/DSGraph.h index f38b59eb067..eb4388b6ad9 100644 --- a/include/llvm/Analysis/DataStructure/DSGraph.h +++ b/include/llvm/Analysis/DataStructure/DSGraph.h @@ -411,7 +411,7 @@ public: // enum MarkIncompleteFlags { MarkFormalArgs = 1, IgnoreFormalArgs = 0, - IgnoreGlobals = 2, MarkGlobalsIncomplete = 0, + IgnoreGlobals = 2, MarkGlobalsIncomplete = 0 }; void markIncompleteNodes(unsigned Flags); @@ -421,7 +421,7 @@ public: // graph entirely. This is only appropriate to use when inlining graphs. // enum RemoveDeadNodesFlags { - RemoveUnreachableGlobals = 1, KeepUnreachableGlobals = 0, + RemoveUnreachableGlobals = 1, KeepUnreachableGlobals = 0 }; void removeDeadNodes(unsigned Flags); @@ -432,7 +432,7 @@ public: DontCloneCallNodes = 1 << 1, CloneCallNodes = 0, DontCloneAuxCallNodes = 1 << 2, CloneAuxCallNodes = 0, StripModRefBits = 1 << 3, KeepModRefBits = 0, - StripIncompleteBit = 1 << 4, KeepIncompleteBit = 0, + StripIncompleteBit = 1 << 4, KeepIncompleteBit = 0 }; void updateFromGlobalGraph(); diff --git a/include/llvm/Analysis/DataStructure/DSNode.h b/include/llvm/Analysis/DataStructure/DSNode.h index e3442056cca..83c9aba5d85 100644 --- a/include/llvm/Analysis/DataStructure/DSNode.h +++ b/include/llvm/Analysis/DataStructure/DSNode.h @@ -95,7 +95,7 @@ public: DEAD = 1 << 8, // This node is dead and should not be pointed to //#endif - Composition = AllocaNode | HeapNode | GlobalNode | UnknownNode, + Composition = AllocaNode | HeapNode | GlobalNode | UnknownNode }; /// NodeType - A union of the above bits. "Shadow" nodes do not add any flags diff --git a/include/llvm/Analysis/DataStructure/DSSupport.h b/include/llvm/Analysis/DataStructure/DSSupport.h index 2fc52db25f0..dc4c31f60a4 100644 --- a/include/llvm/Analysis/DataStructure/DSSupport.h +++ b/include/llvm/Analysis/DataStructure/DSSupport.h @@ -40,7 +40,7 @@ namespace DS { // FIXME: After the paper, this should get cleaned up /// a pointer. /// bool isPointerType(const Type *Ty); -}; +} //===----------------------------------------------------------------------===// /// DSNodeHandle - Implement a "handle" to a data structure node that takes care diff --git a/include/llvm/Analysis/LinkAllAnalyses.h b/include/llvm/Analysis/LinkAllAnalyses.h index afb120ed873..cac2abdc4c5 100644 --- a/include/llvm/Analysis/LinkAllAnalyses.h +++ b/include/llvm/Analysis/LinkAllAnalyses.h @@ -55,6 +55,6 @@ namespace { X.add((llvm::Value*)0, 0); // for -print-alias-sets } } ForceAnalysisPassLinking; -}; +} #endif diff --git a/include/llvm/Bytecode/Archive.h b/include/llvm/Bytecode/Archive.h index 618f0516cad..dfc31261f67 100644 --- a/include/llvm/Bytecode/Archive.h +++ b/include/llvm/Bytecode/Archive.h @@ -56,7 +56,7 @@ class ArchiveMember { CompressedBytecodeFlag = 32, ///< Member is compressed bytecode HasPathFlag = 64, ///< Member has a full or partial path HasLongFilenameFlag = 128, ///< Member uses the long filename syntax - StringTableFlag = 256, ///< Member is an ar(1) format string table + StringTableFlag = 256 ///< Member is an ar(1) format string table }; /// @} diff --git a/include/llvm/Bytecode/Format.h b/include/llvm/Bytecode/Format.h index 5f5feb8ddca..24d1ed67ee8 100644 --- a/include/llvm/Bytecode/Format.h +++ b/include/llvm/Bytecode/Format.h @@ -47,7 +47,7 @@ public: // tables for a function, allowing the indices used within the function to // be as small as possible. This often allows the instructions to be // encoded more efficiently. - CompactionTable = 0x33, + CompactionTable = 0x33 }; /// In LLVM 1.3 format, the identifier and the size of the block are diff --git a/include/llvm/CallingConv.h b/include/llvm/CallingConv.h index 6da5482f454..fd62fb73030 100644 --- a/include/llvm/CallingConv.h +++ b/include/llvm/CallingConv.h @@ -45,7 +45,7 @@ namespace CallingConv { // Target - This is the start of the target-specific calling conventions, // e.g. fastcall and thiscall on X86. - FirstTargetCC = 64, + FirstTargetCC = 64 }; } // End CallingConv namespace diff --git a/include/llvm/CodeGen/ELFWriter.h b/include/llvm/CodeGen/ELFWriter.h index cc76e4d7b16..b3914794f04 100644 --- a/include/llvm/CodeGen/ELFWriter.h +++ b/include/llvm/CodeGen/ELFWriter.h @@ -131,7 +131,7 @@ namespace llvm { SHF_LINK_ORDER = 1 << 7, // Preserve order after combining SHF_OS_NONCONFORMING = 1 << 8, // nonstandard OS support required SHF_GROUP = 1 << 9, // Section is a member of a group - SHF_TLS = 1 << 10,// Section holds thread-local data + SHF_TLS = 1 << 10 // Section holds thread-local data }; ELFSection(const std::string &name) diff --git a/include/llvm/CodeGen/LiveIntervalAnalysis.h b/include/llvm/CodeGen/LiveIntervalAnalysis.h index a313c4b9f42..0ae4b5ad0f2 100644 --- a/include/llvm/CodeGen/LiveIntervalAnalysis.h +++ b/include/llvm/CodeGen/LiveIntervalAnalysis.h @@ -60,7 +60,7 @@ namespace llvm { USE = 1, DEF = 2, STORE = 3, - NUM = 4, + NUM = 4 }; }; diff --git a/include/llvm/CodeGen/MachineInstr.h b/include/llvm/CodeGen/MachineInstr.h index 56f374978ac..4f09046b0e5 100644 --- a/include/llvm/CodeGen/MachineInstr.h +++ b/include/llvm/CodeGen/MachineInstr.h @@ -79,7 +79,7 @@ private: LOFLAG32 = 0x08, // operand is %lo32(value_or_immedVal) HIFLAG64 = 0x10, // operand is %hi64(value_or_immedVal) LOFLAG64 = 0x20, // operand is %lo64(value_or_immedVal) - PCRELATIVE = 0x40, // Operand is relative to PC, not a global address + PCRELATIVE = 0x40 // Operand is relative to PC, not a global address }; public: @@ -106,7 +106,7 @@ public: MO_FrameIndex, // Abstract Stack Frame Index MO_ConstantPoolIndex, // Address of indexed Constant in Constant Pool MO_ExternalSymbol, // Name of external global symbol - MO_GlobalAddress, // Address of a global value + MO_GlobalAddress // Address of a global value }; private: diff --git a/include/llvm/CodeGen/ScheduleDAG.h b/include/llvm/CodeGen/ScheduleDAG.h index c3513960ba6..6c90a4a4771 100644 --- a/include/llvm/CodeGen/ScheduleDAG.h +++ b/include/llvm/CodeGen/ScheduleDAG.h @@ -41,7 +41,7 @@ namespace llvm { noScheduling, // No scheduling, emit breath first sequence. simpleScheduling, // Two pass, min. critical path, max. utilization. simpleNoItinScheduling, // Same as above exact using generic latency. - listSchedulingBURR, // Bottom up reg reduction list scheduling. + listSchedulingBURR // Bottom up reg reduction list scheduling. }; diff --git a/include/llvm/CodeGen/SelectionDAGNodes.h b/include/llvm/CodeGen/SelectionDAGNodes.h index fe75a202d7e..b72bf20fd19 100644 --- a/include/llvm/CodeGen/SelectionDAGNodes.h +++ b/include/llvm/CodeGen/SelectionDAGNodes.h @@ -402,7 +402,7 @@ namespace ISD { DEBUG_LABEL, // BUILTIN_OP_END - This must be the last enum value in this list. - BUILTIN_OP_END, + BUILTIN_OP_END }; //===--------------------------------------------------------------------===// @@ -447,7 +447,7 @@ namespace ISD { SETNE, // 1 X 1 1 0 True if not equal SETTRUE2, // 1 X 1 1 1 Always true (always folded) - SETCC_INVALID, // Marker value. + SETCC_INVALID // Marker value. }; /// isSignedIntSetCC - Return true if this is a setcc instruction that diff --git a/include/llvm/CodeGen/ValueTypes.h b/include/llvm/CodeGen/ValueTypes.h index 2fc4b0f9466..370f5c36206 100644 --- a/include/llvm/CodeGen/ValueTypes.h +++ b/include/llvm/CodeGen/ValueTypes.h @@ -59,7 +59,7 @@ namespace MVT { // MVT = Machine Value Types v4f32 = 21, // 4 x f32 v2f64 = 22, // 2 x f64 - LAST_VALUETYPE, // This always remains at the end of the list. + LAST_VALUETYPE // This always remains at the end of the list. }; static inline bool isInteger(ValueType VT) { @@ -136,7 +136,7 @@ namespace MVT { // MVT = Machine Value Types /// to the specified ValueType. For integer types, this returns an unsigned /// type. Note that this will abort for types that cannot be represented. const Type *getTypeForValueType(ValueType VT); -}; +} } // End llvm namespace diff --git a/include/llvm/Linker.h b/include/llvm/Linker.h index 21f32afb3c0..b260dc3fc17 100644 --- a/include/llvm/Linker.h +++ b/include/llvm/Linker.h @@ -53,7 +53,7 @@ class Linker { enum ControlFlags { Verbose = 1, ///< Print to std::cerr what steps the linker is taking QuietWarnings = 2, ///< Don't print errors and warnings to std::cerr. - QuietErrors = 4, ///< Indicate that this link is for a native executable + QuietErrors = 4 ///< Indicate that this link is for a native executable }; /// @} diff --git a/include/llvm/PassAnalysisSupport.h b/include/llvm/PassAnalysisSupport.h index 415f93cc67b..892d203ba3a 100644 --- a/include/llvm/PassAnalysisSupport.h +++ b/include/llvm/PassAnalysisSupport.h @@ -19,6 +19,8 @@ #ifndef LLVM_PASS_ANALYSIS_SUPPORT_H #define LLVM_PASS_ANALYSIS_SUPPORT_H +#include + namespace llvm { // No need to include Pass.h, we are being included by it! diff --git a/include/llvm/System/MappedFile.h b/include/llvm/System/MappedFile.h index 6092de6ffb8..9fd0d08357a 100644 --- a/include/llvm/System/MappedFile.h +++ b/include/llvm/System/MappedFile.h @@ -38,7 +38,7 @@ namespace sys { READ_ACCESS = 0x0001, ///< Map the file for reading WRITE_ACCESS = 0x0002, ///< Map the file for write access EXEC_ACCESS = 0x0004, ///< Map the file for execution access - SHARED_MAPPING = 0x0008, ///< Map the file shared with other processes + SHARED_MAPPING = 0x0008 ///< Map the file shared with other processes }; /// @} /// @name Constructors diff --git a/include/llvm/System/Path.h b/include/llvm/System/Path.h index 3ff657b0f67..5cbca9b31a9 100644 --- a/include/llvm/System/Path.h +++ b/include/llvm/System/Path.h @@ -553,7 +553,7 @@ namespace sys { UnknownFileType = 0, ///< Unrecognized file BytecodeFileType = 1, ///< Uncompressed bytecode file CompressedBytecodeFileType = 2, ///< Compressed bytecode file - ArchiveFileType = 3, ///< ar style archive file + ArchiveFileType = 3 ///< ar style archive file }; /// This utility function allows any memory block to be examined in order diff --git a/include/llvm/System/TimeValue.h b/include/llvm/System/TimeValue.h index 47f79cece59..624eb70176f 100644 --- a/include/llvm/System/TimeValue.h +++ b/include/llvm/System/TimeValue.h @@ -75,7 +75,7 @@ namespace sys { NANOSECONDS_PER_MICROSECOND = 1000, ///< One Thousand NANOSECONDS_PER_MILLISECOND = 1000000,///< One Million NANOSECONDS_PER_POSIX_TICK = 100, ///< Posix tick is 100 Hz (10ms) - NANOSECONDS_PER_WIN32_TICK = 100, ///< Win32 tick is 100 Hz (10ms) + NANOSECONDS_PER_WIN32_TICK = 100 ///< Win32 tick is 100 Hz (10ms) }; /// @} diff --git a/include/llvm/Target/MRegisterInfo.h b/include/llvm/Target/MRegisterInfo.h index 2f6d1308cbe..a7ce2dc1114 100644 --- a/include/llvm/Target/MRegisterInfo.h +++ b/include/llvm/Target/MRegisterInfo.h @@ -169,7 +169,7 @@ public: /// namespace. This must be the same for all targets, which means that each /// target is limited to 1024 registers. /// - FirstVirtualRegister = 1024, + FirstVirtualRegister = 1024 }; /// isPhysicalRegister - Return true if the specified register number is in diff --git a/include/llvm/Target/TargetLowering.h b/include/llvm/Target/TargetLowering.h index 4757a4a56a7..141e50d6313 100644 --- a/include/llvm/Target/TargetLowering.h +++ b/include/llvm/Target/TargetLowering.h @@ -56,24 +56,24 @@ public: 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. - Custom, // Use the LowerOperation hook to implement custom lowering. + Custom // Use the LowerOperation hook to implement custom lowering. }; enum OutOfRangeShiftAmount { Undefined, // Oversized shift amounts are undefined (default). Mask, // Shift amounts are auto masked (anded) to value size. - Extend, // Oversized shift pulls in zeros or sign bits. + Extend // Oversized shift pulls in zeros or sign bits. }; enum SetCCResultValue { UndefinedSetCCResult, // SetCC returns a garbage/unknown extend. ZeroOrOneSetCCResult, // SetCC returns a zero extended result. - ZeroOrNegativeOneSetCCResult, // SetCC returns a sign extended result. + ZeroOrNegativeOneSetCCResult // SetCC returns a sign extended result. }; enum SchedPreference { SchedulingForLatency, // Scheduling for shortest total latency. - SchedulingForRegPressure, // Scheduling for lowest register pressure. + SchedulingForRegPressure // Scheduling for lowest register pressure. }; TargetLowering(TargetMachine &TM); diff --git a/include/llvm/Transforms/LinkAllPasses.h b/include/llvm/Transforms/LinkAllPasses.h index 7986e3bd588..cc9621fefab 100644 --- a/include/llvm/Transforms/LinkAllPasses.h +++ b/include/llvm/Transforms/LinkAllPasses.h @@ -110,6 +110,6 @@ namespace { } } ForcePassLinking; -}; +} #endif diff --git a/include/llvm/Transforms/RSProfiling.h b/include/llvm/Transforms/RSProfiling.h index 897f63ef620..2df2932f295 100644 --- a/include/llvm/Transforms/RSProfiling.h +++ b/include/llvm/Transforms/RSProfiling.h @@ -27,4 +27,4 @@ namespace llvm { /// inserted by the profiler. virtual bool isProfiling(Value* v) = 0; }; -}; +}