From 170a15e98dc6900df1ae40d03c5f0622d792fb45 Mon Sep 17 00:00:00 2001 From: Joe Abbey Date: Sun, 25 Nov 2012 15:23:39 +0000 Subject: Code Custodian: - Widespread trailing space removal - A dash of OCD spacing to block align enums - joined a line that probably needed 80 cols a while back git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168566 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Bitcode/Reader/BitcodeReader.h | 50 +++++++++++++++++++------------------- 1 file changed, 25 insertions(+), 25 deletions(-) (limited to 'lib/Bitcode/Reader/BitcodeReader.h') diff --git a/lib/Bitcode/Reader/BitcodeReader.h b/lib/Bitcode/Reader/BitcodeReader.h index 3d5c0eb4de..f3b516ecfd 100644 --- a/lib/Bitcode/Reader/BitcodeReader.h +++ b/lib/Bitcode/Reader/BitcodeReader.h @@ -27,14 +27,14 @@ namespace llvm { class MemoryBuffer; class LLVMContext; - + //===----------------------------------------------------------------------===// // BitcodeReaderValueList Class //===----------------------------------------------------------------------===// class BitcodeReaderValueList { std::vector ValuePtrs; - + /// ResolveConstants - As we resolve forward-referenced constants, we add /// information about them to this vector. This allows us to resolve them in /// bulk instead of resolving each reference at a time. See the code in @@ -57,17 +57,17 @@ public: void push_back(Value *V) { ValuePtrs.push_back(V); } - + void clear() { assert(ResolveConstants.empty() && "Constants not resolved?"); ValuePtrs.clear(); } - + Value *operator[](unsigned i) const { assert(i < ValuePtrs.size()); return ValuePtrs[i]; } - + Value *back() const { return ValuePtrs.back(); } void pop_back() { ValuePtrs.pop_back(); } bool empty() const { return ValuePtrs.empty(); } @@ -75,12 +75,12 @@ public: assert(N <= size() && "Invalid shrinkTo request!"); ValuePtrs.resize(N); } - + Constant *getConstantFwdRef(unsigned Idx, Type *Ty); Value *getValueFwdRef(unsigned Idx, Type *Ty); - + void AssignValue(Value *V, unsigned Idx); - + /// ResolveConstantForwardRefs - Once all constants are read, this method bulk /// resolves any forward references. void ResolveConstantForwardRefs(); @@ -93,7 +93,7 @@ public: class BitcodeReaderMDValueList { std::vector MDValuePtrs; - + LLVMContext &Context; public: BitcodeReaderMDValueList(LLVMContext& C) : Context(C) {} @@ -106,12 +106,12 @@ public: Value *back() const { return MDValuePtrs.back(); } void pop_back() { MDValuePtrs.pop_back(); } bool empty() const { return MDValuePtrs.empty(); } - + Value *operator[](unsigned i) const { assert(i < MDValuePtrs.size()); return MDValuePtrs[i]; } - + void shrinkTo(unsigned N) { assert(N <= size() && "Invalid shrinkTo request!"); MDValuePtrs.resize(N); @@ -131,9 +131,9 @@ class BitcodeReader : public GVMaterializer { DataStreamer *LazyStreamer; uint64_t NextUnreadBit; bool SeenValueSymbolTable; - + const char *ErrorString; - + std::vector TypeList; BitcodeReaderValueList ValueList; BitcodeReaderMDValueList MDValueList; @@ -142,38 +142,38 @@ class BitcodeReader : public GVMaterializer { std::vector > GlobalInits; std::vector > AliasInits; - + /// MAttributes - The set of attributes by index. Index zero in the /// file is for null, and is thus not represented here. As such all indices /// are off by one. std::vector MAttributes; - + /// FunctionBBs - While parsing a function body, this is a list of the basic /// blocks for the function. std::vector FunctionBBs; - + // When reading the module header, this list is populated with functions that // have bodies later in the file. std::vector FunctionsWithBodies; - // When intrinsic functions are encountered which require upgrading they are + // When intrinsic functions are encountered which require upgrading they are // stored here with their replacement function. typedef std::vector > UpgradedIntrinsicMap; UpgradedIntrinsicMap UpgradedIntrinsics; // Map the bitcode's custom MDKind ID to the Module's MDKind ID. DenseMap MDKindMap; - + // Several operations happen after the module header has been read, but // before function bodies are processed. This keeps track of whether // we've done this yet. bool SeenFirstFunctionBody; - + /// DeferredFunctionInfo - When function bodies are initially scanned, this /// map contains info about where to find deferred function body in the /// stream. DenseMap DeferredFunctionInfo; - + /// BlockAddrFwdRefs - These are blockaddr references to basic blocks. These /// are resolved lazily when functions are loaded. typedef std::pair BlockAddrRefTy; @@ -208,11 +208,11 @@ public: void materializeForwardReferencedFunctions(); void FreeState(); - + /// setBufferOwned - If this is true, the reader will destroy the MemoryBuffer /// when the reader is destroyed. void setBufferOwned(bool Owned) { BufferOwned = Owned; } - + virtual bool isMaterializable(const GlobalValue *GV) const; virtual bool isDematerializable(const GlobalValue *GV) const; virtual bool Materialize(GlobalValue *GV, std::string *ErrInfo = 0); @@ -224,7 +224,7 @@ public: return true; } const char *getErrorString() const { return ErrorString; } - + /// @brief Main interface to parsing a bitcode buffer. /// @returns true if an error occurred. bool ParseBitcodeInto(Module *M); @@ -251,7 +251,7 @@ private: return MAttributes[i-1]; return AttrListPtr(); } - + /// getValueTypePair - Read a value/type pair out of the specified record from /// slot 'Slot'. Increment Slot past the number of slots used in the record. /// Return true on failure. @@ -339,7 +339,7 @@ private: bool FindFunctionInStream(Function *F, DenseMap::iterator DeferredFunctionInfoIterator); }; - + } // End llvm namespace #endif -- cgit v1.2.3-70-g09d2 From a1514e24cc24b050f53a12650e047799358833a1 Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Tue, 4 Dec 2012 07:12:27 +0000 Subject: Sort includes for all of the .h files under the 'lib' tree. These were missed in the first pass because the script didn't yet handle include guards. Note that the script is now able to handle all of these headers without manual edits. =] git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169224 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Archive/ArchiveInternals.h | 3 +-- lib/AsmParser/LLLexer.h | 2 +- lib/AsmParser/LLParser.h | 6 +++--- lib/Bitcode/Reader/BitcodeReader.h | 8 ++++---- lib/CodeGen/AggressiveAntiDepBreaker.h | 6 +++--- lib/CodeGen/AllocationOrder.cpp | 2 +- lib/CodeGen/AllocationOrder.h | 2 +- lib/CodeGen/AsmPrinter/DwarfAccelTable.h | 8 ++++---- lib/CodeGen/AsmPrinter/DwarfCompileUnit.h | 4 ++-- lib/CodeGen/AsmPrinter/DwarfDebug.h | 8 ++++---- lib/CodeGen/CriticalAntiDepBreaker.h | 2 +- lib/CodeGen/PrologEpilogInserter.h | 6 +++--- lib/CodeGen/RegAllocBase.h | 4 ++-- lib/CodeGen/SelectionDAG/InstrEmitter.h | 4 ++-- lib/CodeGen/SelectionDAG/LegalizeTypes.h | 4 ++-- lib/CodeGen/SelectionDAG/SDNodeDbgValue.h | 2 +- lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h | 4 ++-- lib/DebugInfo/DWARFContext.h | 2 +- lib/ExecutionEngine/EventListenerCommon.h | 4 ++-- lib/ExecutionEngine/Interpreter/Interpreter.h | 4 ++-- lib/ExecutionEngine/MCJIT/MCJIT.h | 2 +- lib/ExecutionEngine/RuntimeDyld/ObjectImageCommon.h | 4 ++-- lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h | 4 ++-- lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h | 2 +- lib/MC/MCDisassembler/Disassembler.h | 2 +- lib/MC/MCDisassembler/EDDisassembler.h | 4 +--- lib/MC/MCDisassembler/EDInst.h | 2 +- lib/Support/Unix/Unix.h | 6 +++--- lib/TableGen/TGLexer.h | 2 +- lib/TableGen/TGParser.h | 4 ++-- lib/Target/ARM/ARMBaseInstrInfo.h | 4 ++-- lib/Target/ARM/ARMISelLowering.h | 6 +++--- lib/Target/ARM/ARMJITInfo.h | 4 ++-- lib/Target/ARM/ARMMachineFunctionInfo.h | 4 ++-- lib/Target/ARM/ARMSubtarget.h | 4 ++-- lib/Target/ARM/ARMTargetMachine.h | 14 +++++++------- lib/Target/CppBackend/CPPTargetMachine.h | 2 +- lib/Target/Hexagon/HexagonCallingConvLower.h | 4 ++-- lib/Target/Hexagon/HexagonISelLowering.h | 2 +- lib/Target/Hexagon/HexagonInstrInfo.h | 2 +- lib/Target/Hexagon/HexagonMCInst.h | 2 +- lib/Target/Hexagon/HexagonMachineScheduler.h | 8 ++++---- lib/Target/Hexagon/HexagonRegisterInfo.h | 2 +- lib/Target/Hexagon/HexagonSubtarget.h | 2 +- lib/Target/Hexagon/HexagonTargetMachine.h | 8 ++++---- lib/Target/MBlaze/MBlazeISelLowering.h | 2 +- lib/Target/MBlaze/MBlazeMachineFunction.h | 2 +- lib/Target/MBlaze/MBlazeSubtarget.h | 2 +- lib/Target/MBlaze/MBlazeTargetMachine.h | 12 ++++++------ lib/Target/MSP430/MSP430TargetMachine.h | 6 +++--- lib/Target/Mips/Mips16InstrInfo.h | 2 +- lib/Target/Mips/MipsAsmPrinter.h | 2 +- lib/Target/Mips/MipsMachineFunction.h | 2 +- lib/Target/Mips/MipsSubtarget.h | 2 +- lib/Target/Mips/MipsTargetMachine.h | 4 ++-- lib/Target/NVPTX/NVPTX.h | 4 ++-- lib/Target/NVPTX/NVPTXAllocaHoisting.h | 2 +- lib/Target/NVPTX/NVPTXAsmPrinter.h | 12 ++++++------ lib/Target/NVPTX/NVPTXLowerAggrCopies.h | 2 +- lib/Target/NVPTX/NVPTXSection.h | 2 +- lib/Target/NVPTX/NVPTXSplitBBatBar.h | 2 +- lib/Target/NVPTX/NVPTXSubtarget.h | 2 +- lib/Target/NVPTX/NVPTXTargetMachine.h | 6 +++--- lib/Target/NVPTX/NVPTXUtilities.h | 4 ++-- lib/Target/PowerPC/PPCFrameLowering.h | 2 +- lib/Target/PowerPC/PPCISelLowering.h | 2 +- lib/Target/PowerPC/PPCJITInfo.h | 2 +- lib/Target/PowerPC/PPCSubtarget.h | 4 ++-- lib/Target/PowerPC/PPCTargetMachine.h | 8 ++++---- lib/Target/Sparc/SparcTargetMachine.h | 6 +++--- lib/Target/X86/X86COFFMachineModuleInfo.h | 2 +- lib/Target/X86/X86ISelLowering.h | 12 ++++++------ lib/Target/X86/X86JITInfo.h | 2 +- lib/Target/X86/X86Subtarget.h | 2 +- lib/Target/X86/X86TargetMachine.h | 6 +++--- lib/Target/X86/X86TargetObjectFile.h | 2 +- lib/Target/XCore/XCoreMachineFunctionInfo.h | 2 +- lib/Target/XCore/XCoreSubtarget.h | 2 +- lib/Target/XCore/XCoreTargetMachine.h | 6 +++--- lib/Transforms/InstCombine/InstCombine.h | 2 +- lib/Transforms/InstCombine/InstCombineWorklist.h | 6 +++--- lib/Transforms/Instrumentation/MaximumSpanningTree.h | 4 ++-- lib/VMCore/AttributesImpl.h | 2 +- lib/VMCore/LLVMContextImpl.h | 12 ++++++------ 84 files changed, 170 insertions(+), 173 deletions(-) (limited to 'lib/Bitcode/Reader/BitcodeReader.h') diff --git a/lib/Archive/ArchiveInternals.h b/lib/Archive/ArchiveInternals.h index 639f5ac269..f6c87e899f 100644 --- a/lib/Archive/ArchiveInternals.h +++ b/lib/Archive/ArchiveInternals.h @@ -14,10 +14,9 @@ #ifndef LIB_ARCHIVE_ARCHIVEINTERNALS_H #define LIB_ARCHIVE_ARCHIVEINTERNALS_H +#include "llvm/ADT/StringExtras.h" #include "llvm/Bitcode/Archive.h" #include "llvm/Support/TimeValue.h" -#include "llvm/ADT/StringExtras.h" - #include #define ARFILE_MAGIC "!\n" ///< magic string diff --git a/lib/AsmParser/LLLexer.h b/lib/AsmParser/LLLexer.h index 09aea5b018..1a307a8bec 100644 --- a/lib/AsmParser/LLLexer.h +++ b/lib/AsmParser/LLLexer.h @@ -15,8 +15,8 @@ #define LIB_ASMPARSER_LLLEXER_H #include "LLToken.h" -#include "llvm/ADT/APSInt.h" #include "llvm/ADT/APFloat.h" +#include "llvm/ADT/APSInt.h" #include "llvm/Support/SourceMgr.h" #include diff --git a/lib/AsmParser/LLParser.h b/lib/AsmParser/LLParser.h index e481283e6e..b4cc12b28b 100644 --- a/lib/AsmParser/LLParser.h +++ b/lib/AsmParser/LLParser.h @@ -15,14 +15,14 @@ #define LLVM_ASMPARSER_LLPARSER_H #include "LLLexer.h" +#include "llvm/ADT/DenseMap.h" +#include "llvm/ADT/StringMap.h" #include "llvm/Attributes.h" #include "llvm/Instructions.h" #include "llvm/Module.h" #include "llvm/Operator.h" -#include "llvm/Type.h" -#include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/StringMap.h" #include "llvm/Support/ValueHandle.h" +#include "llvm/Type.h" #include namespace llvm { diff --git a/lib/Bitcode/Reader/BitcodeReader.h b/lib/Bitcode/Reader/BitcodeReader.h index f3b516ecfd..34e96b07b4 100644 --- a/lib/Bitcode/Reader/BitcodeReader.h +++ b/lib/Bitcode/Reader/BitcodeReader.h @@ -14,14 +14,14 @@ #ifndef BITCODE_READER_H #define BITCODE_READER_H -#include "llvm/GVMaterializer.h" +#include "llvm/ADT/DenseMap.h" #include "llvm/Attributes.h" -#include "llvm/Type.h" -#include "llvm/OperandTraits.h" #include "llvm/Bitcode/BitstreamReader.h" #include "llvm/Bitcode/LLVMBitCodes.h" +#include "llvm/GVMaterializer.h" +#include "llvm/OperandTraits.h" #include "llvm/Support/ValueHandle.h" -#include "llvm/ADT/DenseMap.h" +#include "llvm/Type.h" #include namespace llvm { diff --git a/lib/CodeGen/AggressiveAntiDepBreaker.h b/lib/CodeGen/AggressiveAntiDepBreaker.h index 7067784854..6683630fba 100644 --- a/lib/CodeGen/AggressiveAntiDepBreaker.h +++ b/lib/CodeGen/AggressiveAntiDepBreaker.h @@ -18,15 +18,15 @@ #define LLVM_CODEGEN_AGGRESSIVEANTIDEPBREAKER_H #include "AntiDepBreaker.h" +#include "llvm/ADT/BitVector.h" +#include "llvm/ADT/SmallSet.h" #include "llvm/CodeGen/MachineBasicBlock.h" #include "llvm/CodeGen/MachineFrameInfo.h" #include "llvm/CodeGen/MachineFunction.h" #include "llvm/CodeGen/MachineRegisterInfo.h" #include "llvm/CodeGen/ScheduleDAG.h" -#include "llvm/Target/TargetSubtargetInfo.h" #include "llvm/Target/TargetRegisterInfo.h" -#include "llvm/ADT/BitVector.h" -#include "llvm/ADT/SmallSet.h" +#include "llvm/Target/TargetSubtargetInfo.h" #include namespace llvm { diff --git a/lib/CodeGen/AllocationOrder.cpp b/lib/CodeGen/AllocationOrder.cpp index 0f32b66f41..a76791025d 100644 --- a/lib/CodeGen/AllocationOrder.cpp +++ b/lib/CodeGen/AllocationOrder.cpp @@ -20,9 +20,9 @@ #include "llvm/CodeGen/MachineRegisterInfo.h" #include "llvm/CodeGen/RegisterClassInfo.h" #include "llvm/CodeGen/VirtRegMap.h" -#include "llvm/Target/TargetMachine.h" #include "llvm/Support/Debug.h" #include "llvm/Support/raw_ostream.h" +#include "llvm/Target/TargetMachine.h" using namespace llvm; diff --git a/lib/CodeGen/AllocationOrder.h b/lib/CodeGen/AllocationOrder.h index 3d3686bf1a..9bcbc732ed 100644 --- a/lib/CodeGen/AllocationOrder.h +++ b/lib/CodeGen/AllocationOrder.h @@ -17,8 +17,8 @@ #ifndef LLVM_CODEGEN_ALLOCATIONORDER_H #define LLVM_CODEGEN_ALLOCATIONORDER_H -#include "llvm/MC/MCRegisterInfo.h" #include "llvm/ADT/ArrayRef.h" +#include "llvm/MC/MCRegisterInfo.h" namespace llvm { diff --git a/lib/CodeGen/AsmPrinter/DwarfAccelTable.h b/lib/CodeGen/AsmPrinter/DwarfAccelTable.h index 92d1bbe4f7..daca0cb5dd 100644 --- a/lib/CodeGen/AsmPrinter/DwarfAccelTable.h +++ b/lib/CodeGen/AsmPrinter/DwarfAccelTable.h @@ -14,18 +14,18 @@ #ifndef CODEGEN_ASMPRINTER_DWARFACCELTABLE_H__ #define CODEGEN_ASMPRINTER_DWARFACCELTABLE_H__ -#include "llvm/ADT/StringMap.h" +#include "DIE.h" #include "llvm/ADT/ArrayRef.h" +#include "llvm/ADT/StringMap.h" #include "llvm/MC/MCSymbol.h" -#include "llvm/Support/Dwarf.h" #include "llvm/Support/DataTypes.h" #include "llvm/Support/Debug.h" +#include "llvm/Support/Dwarf.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/Format.h" #include "llvm/Support/FormattedStream.h" -#include "DIE.h" -#include #include +#include // The dwarf accelerator tables are an indirect hash table optimized // for null lookup rather than access to known data. They are output into diff --git a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h index bb69059045..136e1578f4 100644 --- a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h +++ b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h @@ -15,10 +15,10 @@ #define CODEGEN_ASMPRINTER_DWARFCOMPILEUNIT_H #include "DIE.h" -#include "llvm/DebugInfo.h" #include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/StringMap.h" #include "llvm/ADT/OwningPtr.h" +#include "llvm/ADT/StringMap.h" +#include "llvm/DebugInfo.h" namespace llvm { diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.h b/lib/CodeGen/AsmPrinter/DwarfDebug.h index d90a6d570f..689ccca655 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.h +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.h @@ -15,15 +15,15 @@ #define CODEGEN_ASMPRINTER_DWARFDEBUG_H__ #include "DIE.h" -#include "llvm/DebugInfo.h" -#include "llvm/CodeGen/AsmPrinter.h" -#include "llvm/CodeGen/LexicalScopes.h" -#include "llvm/MC/MachineLocation.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/FoldingSet.h" #include "llvm/ADT/SetVector.h" #include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/StringMap.h" +#include "llvm/CodeGen/AsmPrinter.h" +#include "llvm/CodeGen/LexicalScopes.h" +#include "llvm/DebugInfo.h" +#include "llvm/MC/MachineLocation.h" #include "llvm/Support/Allocator.h" #include "llvm/Support/DebugLoc.h" diff --git a/lib/CodeGen/CriticalAntiDepBreaker.h b/lib/CodeGen/CriticalAntiDepBreaker.h index ad95c48191..8fb2b0eced 100644 --- a/lib/CodeGen/CriticalAntiDepBreaker.h +++ b/lib/CodeGen/CriticalAntiDepBreaker.h @@ -17,13 +17,13 @@ #define LLVM_CODEGEN_CRITICALANTIDEPBREAKER_H #include "AntiDepBreaker.h" +#include "llvm/ADT/BitVector.h" #include "llvm/CodeGen/MachineBasicBlock.h" #include "llvm/CodeGen/MachineFrameInfo.h" #include "llvm/CodeGen/MachineFunction.h" #include "llvm/CodeGen/MachineRegisterInfo.h" #include "llvm/CodeGen/RegisterClassInfo.h" #include "llvm/CodeGen/ScheduleDAG.h" -#include "llvm/ADT/BitVector.h" #include namespace llvm { diff --git a/lib/CodeGen/PrologEpilogInserter.h b/lib/CodeGen/PrologEpilogInserter.h index 0d140a9bb4..87fff9afb3 100644 --- a/lib/CodeGen/PrologEpilogInserter.h +++ b/lib/CodeGen/PrologEpilogInserter.h @@ -22,11 +22,11 @@ #ifndef LLVM_CODEGEN_PEI_H #define LLVM_CODEGEN_PEI_H -#include "llvm/CodeGen/Passes.h" +#include "llvm/ADT/DenseMap.h" +#include "llvm/ADT/SparseBitVector.h" #include "llvm/CodeGen/MachineFunctionPass.h" #include "llvm/CodeGen/MachineLoopInfo.h" -#include "llvm/ADT/SparseBitVector.h" -#include "llvm/ADT/DenseMap.h" +#include "llvm/CodeGen/Passes.h" #include "llvm/Target/TargetRegisterInfo.h" namespace llvm { diff --git a/lib/CodeGen/RegAllocBase.h b/lib/CodeGen/RegAllocBase.h index e0e8e34358..064e40f06b 100644 --- a/lib/CodeGen/RegAllocBase.h +++ b/lib/CodeGen/RegAllocBase.h @@ -37,9 +37,9 @@ #ifndef LLVM_CODEGEN_REGALLOCBASE #define LLVM_CODEGEN_REGALLOCBASE -#include "llvm/CodeGen/RegisterClassInfo.h" -#include "llvm/CodeGen/LiveIntervalUnion.h" #include "llvm/ADT/OwningPtr.h" +#include "llvm/CodeGen/LiveIntervalUnion.h" +#include "llvm/CodeGen/RegisterClassInfo.h" namespace llvm { diff --git a/lib/CodeGen/SelectionDAG/InstrEmitter.h b/lib/CodeGen/SelectionDAG/InstrEmitter.h index 9eddee9e33..9bfb51db8c 100644 --- a/lib/CodeGen/SelectionDAG/InstrEmitter.h +++ b/lib/CodeGen/SelectionDAG/InstrEmitter.h @@ -16,9 +16,9 @@ #ifndef INSTREMITTER_H #define INSTREMITTER_H -#include "llvm/CodeGen/SelectionDAG.h" -#include "llvm/CodeGen/MachineBasicBlock.h" #include "llvm/ADT/DenseMap.h" +#include "llvm/CodeGen/MachineBasicBlock.h" +#include "llvm/CodeGen/SelectionDAG.h" namespace llvm { diff --git a/lib/CodeGen/SelectionDAG/LegalizeTypes.h b/lib/CodeGen/SelectionDAG/LegalizeTypes.h index 8464b7d808..8c53ba38e3 100644 --- a/lib/CodeGen/SelectionDAG/LegalizeTypes.h +++ b/lib/CodeGen/SelectionDAG/LegalizeTypes.h @@ -17,12 +17,12 @@ #define SELECTIONDAG_LEGALIZETYPES_H #define DEBUG_TYPE "legalize-types" -#include "llvm/CodeGen/SelectionDAG.h" -#include "llvm/Target/TargetLowering.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/DenseSet.h" +#include "llvm/CodeGen/SelectionDAG.h" #include "llvm/Support/Compiler.h" #include "llvm/Support/Debug.h" +#include "llvm/Target/TargetLowering.h" namespace llvm { diff --git a/lib/CodeGen/SelectionDAG/SDNodeDbgValue.h b/lib/CodeGen/SelectionDAG/SDNodeDbgValue.h index 2dcb229573..4af7172847 100644 --- a/lib/CodeGen/SelectionDAG/SDNodeDbgValue.h +++ b/lib/CodeGen/SelectionDAG/SDNodeDbgValue.h @@ -15,8 +15,8 @@ #define LLVM_CODEGEN_SDNODEDBGVALUE_H #include "llvm/ADT/SmallVector.h" -#include "llvm/Support/DebugLoc.h" #include "llvm/Support/DataTypes.h" +#include "llvm/Support/DebugLoc.h" namespace llvm { diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h index 5818c09f29..7bb1bb1fea 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h +++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h @@ -14,12 +14,12 @@ #ifndef SELECTIONDAGBUILDER_H #define SELECTIONDAGBUILDER_H -#include "llvm/Constants.h" -#include "llvm/CodeGen/SelectionDAG.h" #include "llvm/ADT/APInt.h" #include "llvm/ADT/DenseMap.h" +#include "llvm/CodeGen/SelectionDAG.h" #include "llvm/CodeGen/SelectionDAGNodes.h" #include "llvm/CodeGen/ValueTypes.h" +#include "llvm/Constants.h" #include "llvm/Support/CallSite.h" #include "llvm/Support/ErrorHandling.h" #include diff --git a/lib/DebugInfo/DWARFContext.h b/lib/DebugInfo/DWARFContext.h index ff161e2aad..24613594de 100644 --- a/lib/DebugInfo/DWARFContext.h +++ b/lib/DebugInfo/DWARFContext.h @@ -14,9 +14,9 @@ #include "DWARFDebugAranges.h" #include "DWARFDebugLine.h" #include "DWARFDebugRangeList.h" -#include "llvm/DebugInfo/DIContext.h" #include "llvm/ADT/OwningPtr.h" #include "llvm/ADT/SmallVector.h" +#include "llvm/DebugInfo/DIContext.h" namespace llvm { diff --git a/lib/ExecutionEngine/EventListenerCommon.h b/lib/ExecutionEngine/EventListenerCommon.h index 911d1d68b2..cd2124c6e3 100644 --- a/lib/ExecutionEngine/EventListenerCommon.h +++ b/lib/ExecutionEngine/EventListenerCommon.h @@ -14,11 +14,11 @@ #ifndef EVENT_LISTENER_COMMON_H #define EVENT_LISTENER_COMMON_H +#include "llvm/ADT/DenseMap.h" #include "llvm/DebugInfo.h" #include "llvm/Metadata.h" -#include "llvm/ADT/DenseMap.h" -#include "llvm/Support/ValueHandle.h" #include "llvm/Support/Path.h" +#include "llvm/Support/ValueHandle.h" namespace llvm { diff --git a/lib/ExecutionEngine/Interpreter/Interpreter.h b/lib/ExecutionEngine/Interpreter/Interpreter.h index 9d296f84ba..0c03760494 100644 --- a/lib/ExecutionEngine/Interpreter/Interpreter.h +++ b/lib/ExecutionEngine/Interpreter/Interpreter.h @@ -15,10 +15,10 @@ #define LLI_INTERPRETER_H #include "llvm/DataLayout.h" -#include "llvm/Function.h" -#include "llvm/InstVisitor.h" #include "llvm/ExecutionEngine/ExecutionEngine.h" #include "llvm/ExecutionEngine/GenericValue.h" +#include "llvm/Function.h" +#include "llvm/InstVisitor.h" #include "llvm/Support/CallSite.h" #include "llvm/Support/DataTypes.h" #include "llvm/Support/ErrorHandling.h" diff --git a/lib/ExecutionEngine/MCJIT/MCJIT.h b/lib/ExecutionEngine/MCJIT/MCJIT.h index 571080d2bd..283a8e5281 100644 --- a/lib/ExecutionEngine/MCJIT/MCJIT.h +++ b/lib/ExecutionEngine/MCJIT/MCJIT.h @@ -10,10 +10,10 @@ #ifndef LLVM_LIB_EXECUTIONENGINE_MCJIT_H #define LLVM_LIB_EXECUTIONENGINE_MCJIT_H -#include "llvm/PassManager.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ExecutionEngine/ExecutionEngine.h" #include "llvm/ExecutionEngine/RuntimeDyld.h" +#include "llvm/PassManager.h" namespace llvm { diff --git a/lib/ExecutionEngine/RuntimeDyld/ObjectImageCommon.h b/lib/ExecutionEngine/RuntimeDyld/ObjectImageCommon.h index 097df35a5c..28b4f0f84a 100644 --- a/lib/ExecutionEngine/RuntimeDyld/ObjectImageCommon.h +++ b/lib/ExecutionEngine/RuntimeDyld/ObjectImageCommon.h @@ -14,9 +14,9 @@ #ifndef LLVM_RUNTIMEDYLD_OBJECTIMAGECOMMON_H #define LLVM_RUNTIMEDYLD_OBJECTIMAGECOMMON_H -#include "llvm/Object/ObjectFile.h" -#include "llvm/ExecutionEngine/ObjectImage.h" #include "llvm/ExecutionEngine/ObjectBuffer.h" +#include "llvm/ExecutionEngine/ObjectImage.h" +#include "llvm/Object/ObjectFile.h" namespace llvm { diff --git a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h index a292ee1a84..f100994577 100644 --- a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h +++ b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h @@ -14,12 +14,12 @@ #ifndef LLVM_RUNTIME_DYLD_IMPL_H #define LLVM_RUNTIME_DYLD_IMPL_H -#include "llvm/ExecutionEngine/RuntimeDyld.h" -#include "llvm/ExecutionEngine/ObjectImage.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/StringMap.h" #include "llvm/ADT/Triple.h" +#include "llvm/ExecutionEngine/ObjectImage.h" +#include "llvm/ExecutionEngine/RuntimeDyld.h" #include "llvm/Object/ObjectFile.h" #include "llvm/Support/Debug.h" #include "llvm/Support/ErrorHandling.h" diff --git a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h index fe3539dff6..62d8487078 100644 --- a/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h +++ b/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h @@ -14,10 +14,10 @@ #ifndef LLVM_RUNTIME_DYLD_MACHO_H #define LLVM_RUNTIME_DYLD_MACHO_H +#include "RuntimeDyldImpl.h" #include "llvm/ADT/IndexedMap.h" #include "llvm/Object/MachOObject.h" #include "llvm/Support/Format.h" -#include "RuntimeDyldImpl.h" using namespace llvm; using namespace llvm::object; diff --git a/lib/MC/MCDisassembler/Disassembler.h b/lib/MC/MCDisassembler/Disassembler.h index 322abd5d63..28cf04b95d 100644 --- a/lib/MC/MCDisassembler/Disassembler.h +++ b/lib/MC/MCDisassembler/Disassembler.h @@ -18,10 +18,10 @@ #define LLVM_MC_DISASSEMBLER_H #include "llvm-c/Disassembler.h" -#include #include "llvm/ADT/OwningPtr.h" #include "llvm/ADT/SmallString.h" #include "llvm/Support/raw_ostream.h" +#include namespace llvm { class MCContext; diff --git a/lib/MC/MCDisassembler/EDDisassembler.h b/lib/MC/MCDisassembler/EDDisassembler.h index 6f71908d2b..942b9067e6 100644 --- a/lib/MC/MCDisassembler/EDDisassembler.h +++ b/lib/MC/MCDisassembler/EDDisassembler.h @@ -17,12 +17,10 @@ #define LLVM_EDDISASSEMBLER_H #include "EDInfo.h" - #include "llvm/ADT/OwningPtr.h" #include "llvm/ADT/Triple.h" -#include "llvm/Support/raw_ostream.h" #include "llvm/Support/Mutex.h" - +#include "llvm/Support/raw_ostream.h" #include #include #include diff --git a/lib/MC/MCDisassembler/EDInst.h b/lib/MC/MCDisassembler/EDInst.h index 6b78dc826c..cc0b562130 100644 --- a/lib/MC/MCDisassembler/EDInst.h +++ b/lib/MC/MCDisassembler/EDInst.h @@ -16,8 +16,8 @@ #ifndef LLVM_EDINST_H #define LLVM_EDINST_H -#include "llvm/Support/DataTypes.h" #include "llvm/ADT/SmallVector.h" +#include "llvm/Support/DataTypes.h" #include #include diff --git a/lib/Support/Unix/Unix.h b/lib/Support/Unix/Unix.h index 361f297d36..051f56f969 100644 --- a/lib/Support/Unix/Unix.h +++ b/lib/Support/Unix/Unix.h @@ -21,12 +21,12 @@ #include "llvm/Config/config.h" // Get autoconf configuration settings #include "llvm/Support/Errno.h" -#include +#include +#include #include +#include #include -#include #include -#include #ifdef HAVE_UNISTD_H #include diff --git a/lib/TableGen/TGLexer.h b/lib/TableGen/TGLexer.h index 8a850b5cec..e2e116bb82 100644 --- a/lib/TableGen/TGLexer.h +++ b/lib/TableGen/TGLexer.h @@ -15,9 +15,9 @@ #define TGLEXER_H #include "llvm/Support/DataTypes.h" +#include #include #include -#include namespace llvm { class MemoryBuffer; diff --git a/lib/TableGen/TGParser.h b/lib/TableGen/TGParser.h index 9c2ad43c42..0ea962b995 100644 --- a/lib/TableGen/TGParser.h +++ b/lib/TableGen/TGParser.h @@ -14,11 +14,11 @@ #ifndef TGPARSER_H #define TGPARSER_H -#include "llvm/TableGen/Record.h" #include "TGLexer.h" -#include "llvm/TableGen/Error.h" #include "llvm/ADT/Twine.h" #include "llvm/Support/SourceMgr.h" +#include "llvm/TableGen/Error.h" +#include "llvm/TableGen/Record.h" #include namespace llvm { diff --git a/lib/Target/ARM/ARMBaseInstrInfo.h b/lib/Target/ARM/ARMBaseInstrInfo.h index 6f38e35124..2698132d2d 100644 --- a/lib/Target/ARM/ARMBaseInstrInfo.h +++ b/lib/Target/ARM/ARMBaseInstrInfo.h @@ -15,10 +15,10 @@ #define ARMBASEINSTRUCTIONINFO_H #include "ARM.h" -#include "llvm/CodeGen/MachineInstrBuilder.h" -#include "llvm/Target/TargetInstrInfo.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/SmallSet.h" +#include "llvm/CodeGen/MachineInstrBuilder.h" +#include "llvm/Target/TargetInstrInfo.h" #define GET_INSTRINFO_HEADER #include "ARMGenInstrInfo.inc" diff --git a/lib/Target/ARM/ARMISelLowering.h b/lib/Target/ARM/ARMISelLowering.h index a42ff7849e..487c925dd9 100644 --- a/lib/Target/ARM/ARMISelLowering.h +++ b/lib/Target/ARM/ARMISelLowering.h @@ -17,11 +17,11 @@ #include "ARM.h" #include "ARMSubtarget.h" -#include "llvm/Target/TargetLowering.h" -#include "llvm/Target/TargetRegisterInfo.h" +#include "llvm/CodeGen/CallingConvLower.h" #include "llvm/CodeGen/FastISel.h" #include "llvm/CodeGen/SelectionDAG.h" -#include "llvm/CodeGen/CallingConvLower.h" +#include "llvm/Target/TargetLowering.h" +#include "llvm/Target/TargetRegisterInfo.h" #include namespace llvm { diff --git a/lib/Target/ARM/ARMJITInfo.h b/lib/Target/ARM/ARMJITInfo.h index 7928184427..23a6a9b512 100644 --- a/lib/Target/ARM/ARMJITInfo.h +++ b/lib/Target/ARM/ARMJITInfo.h @@ -15,12 +15,12 @@ #define ARMJITINFO_H #include "ARMMachineFunctionInfo.h" +#include "llvm/ADT/DenseMap.h" +#include "llvm/ADT/SmallVector.h" #include "llvm/CodeGen/MachineConstantPool.h" #include "llvm/CodeGen/MachineFunction.h" #include "llvm/CodeGen/MachineJumpTableInfo.h" #include "llvm/Target/TargetJITInfo.h" -#include "llvm/ADT/DenseMap.h" -#include "llvm/ADT/SmallVector.h" namespace llvm { class ARMTargetMachine; diff --git a/lib/Target/ARM/ARMMachineFunctionInfo.h b/lib/Target/ARM/ARMMachineFunctionInfo.h index c0ac04b600..88d96c0be8 100644 --- a/lib/Target/ARM/ARMMachineFunctionInfo.h +++ b/lib/Target/ARM/ARMMachineFunctionInfo.h @@ -15,10 +15,10 @@ #define ARMMACHINEFUNCTIONINFO_H #include "ARMSubtarget.h" +#include "llvm/ADT/BitVector.h" #include "llvm/CodeGen/MachineFunction.h" -#include "llvm/Target/TargetRegisterInfo.h" #include "llvm/Target/TargetMachine.h" -#include "llvm/ADT/BitVector.h" +#include "llvm/Target/TargetRegisterInfo.h" namespace llvm { diff --git a/lib/Target/ARM/ARMSubtarget.h b/lib/Target/ARM/ARMSubtarget.h index 48d4f770f3..46898cfd8f 100644 --- a/lib/Target/ARM/ARMSubtarget.h +++ b/lib/Target/ARM/ARMSubtarget.h @@ -15,9 +15,9 @@ #define ARMSUBTARGET_H #include "MCTargetDesc/ARMMCTargetDesc.h" -#include "llvm/Target/TargetSubtargetInfo.h" -#include "llvm/MC/MCInstrItineraries.h" #include "llvm/ADT/Triple.h" +#include "llvm/MC/MCInstrItineraries.h" +#include "llvm/Target/TargetSubtargetInfo.h" #include #define GET_SUBTARGETINFO_HEADER diff --git a/lib/Target/ARM/ARMTargetMachine.h b/lib/Target/ARM/ARMTargetMachine.h index ebdd5b4d64..834eb3c66a 100644 --- a/lib/Target/ARM/ARMTargetMachine.h +++ b/lib/Target/ARM/ARMTargetMachine.h @@ -14,20 +14,20 @@ #ifndef ARMTARGETMACHINE_H #define ARMTARGETMACHINE_H -#include "ARMInstrInfo.h" #include "ARMFrameLowering.h" -#include "ARMJITInfo.h" -#include "ARMSubtarget.h" #include "ARMISelLowering.h" +#include "ARMInstrInfo.h" +#include "ARMJITInfo.h" #include "ARMSelectionDAGInfo.h" -#include "Thumb1InstrInfo.h" +#include "ARMSubtarget.h" #include "Thumb1FrameLowering.h" +#include "Thumb1InstrInfo.h" #include "Thumb2InstrInfo.h" -#include "llvm/Target/TargetMachine.h" -#include "llvm/Target/TargetTransformImpl.h" +#include "llvm/ADT/OwningPtr.h" #include "llvm/DataLayout.h" #include "llvm/MC/MCStreamer.h" -#include "llvm/ADT/OwningPtr.h" +#include "llvm/Target/TargetMachine.h" +#include "llvm/Target/TargetTransformImpl.h" namespace llvm { diff --git a/lib/Target/CppBackend/CPPTargetMachine.h b/lib/Target/CppBackend/CPPTargetMachine.h index 30d765d6c9..cc6f1fb832 100644 --- a/lib/Target/CppBackend/CPPTargetMachine.h +++ b/lib/Target/CppBackend/CPPTargetMachine.h @@ -14,8 +14,8 @@ #ifndef CPPTARGETMACHINE_H #define CPPTARGETMACHINE_H -#include "llvm/Target/TargetMachine.h" #include "llvm/DataLayout.h" +#include "llvm/Target/TargetMachine.h" namespace llvm { diff --git a/lib/Target/Hexagon/HexagonCallingConvLower.h b/lib/Target/Hexagon/HexagonCallingConvLower.h index 1f601e87ad..489b3a3e59 100644 --- a/lib/Target/Hexagon/HexagonCallingConvLower.h +++ b/lib/Target/Hexagon/HexagonCallingConvLower.h @@ -17,9 +17,9 @@ #define LLVM_Hexagon_CODEGEN_CALLINGCONVLOWER_H #include "llvm/ADT/SmallVector.h" -#include "llvm/CodeGen/ValueTypes.h" -#include "llvm/CodeGen/SelectionDAGNodes.h" #include "llvm/CodeGen/CallingConvLower.h" +#include "llvm/CodeGen/SelectionDAGNodes.h" +#include "llvm/CodeGen/ValueTypes.h" // // Need to handle varargs. diff --git a/lib/Target/Hexagon/HexagonISelLowering.h b/lib/Target/Hexagon/HexagonISelLowering.h index fe6c905adf..595d3bbac8 100644 --- a/lib/Target/Hexagon/HexagonISelLowering.h +++ b/lib/Target/Hexagon/HexagonISelLowering.h @@ -16,9 +16,9 @@ #define Hexagon_ISELLOWERING_H #include "Hexagon.h" -#include "llvm/Target/TargetLowering.h" #include "llvm/CallingConv.h" #include "llvm/CodeGen/CallingConvLower.h" +#include "llvm/Target/TargetLowering.h" namespace llvm { namespace HexagonISD { diff --git a/lib/Target/Hexagon/HexagonInstrInfo.h b/lib/Target/Hexagon/HexagonInstrInfo.h index 2bb53f899c..29e3eb10f5 100644 --- a/lib/Target/Hexagon/HexagonInstrInfo.h +++ b/lib/Target/Hexagon/HexagonInstrInfo.h @@ -16,8 +16,8 @@ #include "HexagonRegisterInfo.h" #include "MCTargetDesc/HexagonBaseInfo.h" -#include "llvm/Target/TargetInstrInfo.h" #include "llvm/Target/TargetFrameLowering.h" +#include "llvm/Target/TargetInstrInfo.h" #define GET_INSTRINFO_HEADER diff --git a/lib/Target/Hexagon/HexagonMCInst.h b/lib/Target/Hexagon/HexagonMCInst.h index 7a16c241ff..e16636ea48 100644 --- a/lib/Target/Hexagon/HexagonMCInst.h +++ b/lib/Target/Hexagon/HexagonMCInst.h @@ -14,8 +14,8 @@ #ifndef HEXAGONMCINST_H #define HEXAGONMCINST_H -#include "llvm/MC/MCInst.h" #include "llvm/CodeGen/MachineInstr.h" +#include "llvm/MC/MCInst.h" namespace llvm { class HexagonMCInst: public MCInst { diff --git a/lib/Target/Hexagon/HexagonMachineScheduler.h b/lib/Target/Hexagon/HexagonMachineScheduler.h index fe0242a0f7..f68dadf292 100644 --- a/lib/Target/Hexagon/HexagonMachineScheduler.h +++ b/lib/Target/Hexagon/HexagonMachineScheduler.h @@ -14,6 +14,9 @@ #ifndef HEXAGONASMPRINTER_H #define HEXAGONASMPRINTER_H +#include "llvm/ADT/OwningPtr.h" +#include "llvm/ADT/PriorityQueue.h" +#include "llvm/Analysis/AliasAnalysis.h" #include "llvm/CodeGen/LiveIntervalAnalysis.h" #include "llvm/CodeGen/MachineScheduler.h" #include "llvm/CodeGen/Passes.h" @@ -22,14 +25,11 @@ #include "llvm/CodeGen/ResourcePriorityQueue.h" #include "llvm/CodeGen/ScheduleDAGInstrs.h" #include "llvm/CodeGen/ScheduleHazardRecognizer.h" -#include "llvm/Analysis/AliasAnalysis.h" -#include "llvm/Target/TargetInstrInfo.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/Debug.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/raw_ostream.h" -#include "llvm/ADT/OwningPtr.h" -#include "llvm/ADT/PriorityQueue.h" +#include "llvm/Target/TargetInstrInfo.h" using namespace llvm; diff --git a/lib/Target/Hexagon/HexagonRegisterInfo.h b/lib/Target/Hexagon/HexagonRegisterInfo.h index 8820d13e01..e8f3cfb6c3 100644 --- a/lib/Target/Hexagon/HexagonRegisterInfo.h +++ b/lib/Target/Hexagon/HexagonRegisterInfo.h @@ -15,8 +15,8 @@ #ifndef HexagonREGISTERINFO_H #define HexagonREGISTERINFO_H -#include "llvm/Target/TargetRegisterInfo.h" #include "llvm/MC/MachineLocation.h" +#include "llvm/Target/TargetRegisterInfo.h" #define GET_REGINFO_HEADER #include "HexagonGenRegisterInfo.inc" diff --git a/lib/Target/Hexagon/HexagonSubtarget.h b/lib/Target/Hexagon/HexagonSubtarget.h index 5d9d6d890d..76a8fba195 100644 --- a/lib/Target/Hexagon/HexagonSubtarget.h +++ b/lib/Target/Hexagon/HexagonSubtarget.h @@ -14,8 +14,8 @@ #ifndef Hexagon_SUBTARGET_H #define Hexagon_SUBTARGET_H -#include "llvm/Target/TargetSubtargetInfo.h" #include "llvm/Target/TargetMachine.h" +#include "llvm/Target/TargetSubtargetInfo.h" #include #define GET_SUBTARGETINFO_HEADER diff --git a/lib/Target/Hexagon/HexagonTargetMachine.h b/lib/Target/Hexagon/HexagonTargetMachine.h index 7a4215c119..fa669a2719 100644 --- a/lib/Target/Hexagon/HexagonTargetMachine.h +++ b/lib/Target/Hexagon/HexagonTargetMachine.h @@ -14,13 +14,13 @@ #ifndef HexagonTARGETMACHINE_H #define HexagonTARGETMACHINE_H -#include "HexagonInstrInfo.h" -#include "HexagonSubtarget.h" +#include "HexagonFrameLowering.h" #include "HexagonISelLowering.h" +#include "HexagonInstrInfo.h" #include "HexagonSelectionDAGInfo.h" -#include "HexagonFrameLowering.h" -#include "llvm/Target/TargetMachine.h" +#include "HexagonSubtarget.h" #include "llvm/DataLayout.h" +#include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetTransformImpl.h" namespace llvm { diff --git a/lib/Target/MBlaze/MBlazeISelLowering.h b/lib/Target/MBlaze/MBlazeISelLowering.h index a01fab567c..f6b4095a93 100644 --- a/lib/Target/MBlaze/MBlazeISelLowering.h +++ b/lib/Target/MBlaze/MBlazeISelLowering.h @@ -17,8 +17,8 @@ #include "MBlaze.h" #include "MBlazeSubtarget.h" -#include "llvm/Support/ErrorHandling.h" #include "llvm/CodeGen/SelectionDAG.h" +#include "llvm/Support/ErrorHandling.h" #include "llvm/Target/TargetLowering.h" namespace llvm { diff --git a/lib/Target/MBlaze/MBlazeMachineFunction.h b/lib/Target/MBlaze/MBlazeMachineFunction.h index 95cc5077cc..10d507f37b 100644 --- a/lib/Target/MBlaze/MBlazeMachineFunction.h +++ b/lib/Target/MBlaze/MBlazeMachineFunction.h @@ -16,8 +16,8 @@ #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/SmallVector.h" -#include "llvm/CodeGen/MachineFunction.h" #include "llvm/CodeGen/MachineFrameInfo.h" +#include "llvm/CodeGen/MachineFunction.h" namespace llvm { diff --git a/lib/Target/MBlaze/MBlazeSubtarget.h b/lib/Target/MBlaze/MBlazeSubtarget.h index eb375046f2..ed43d21f30 100644 --- a/lib/Target/MBlaze/MBlazeSubtarget.h +++ b/lib/Target/MBlaze/MBlazeSubtarget.h @@ -14,8 +14,8 @@ #ifndef MBLAZESUBTARGET_H #define MBLAZESUBTARGET_H -#include "llvm/Target/TargetSubtargetInfo.h" #include "llvm/MC/MCInstrItineraries.h" +#include "llvm/Target/TargetSubtargetInfo.h" #include #define GET_SUBTARGETINFO_HEADER diff --git a/lib/Target/MBlaze/MBlazeTargetMachine.h b/lib/Target/MBlaze/MBlazeTargetMachine.h index a8df4e63e3..891a57bef5 100644 --- a/lib/Target/MBlaze/MBlazeTargetMachine.h +++ b/lib/Target/MBlaze/MBlazeTargetMachine.h @@ -14,16 +14,16 @@ #ifndef MBLAZE_TARGETMACHINE_H #define MBLAZE_TARGETMACHINE_H -#include "MBlazeSubtarget.h" -#include "MBlazeInstrInfo.h" +#include "MBlazeFrameLowering.h" #include "MBlazeISelLowering.h" -#include "MBlazeSelectionDAGInfo.h" +#include "MBlazeInstrInfo.h" #include "MBlazeIntrinsicInfo.h" -#include "MBlazeFrameLowering.h" -#include "llvm/MC/MCStreamer.h" -#include "llvm/Target/TargetMachine.h" +#include "MBlazeSelectionDAGInfo.h" +#include "MBlazeSubtarget.h" #include "llvm/DataLayout.h" +#include "llvm/MC/MCStreamer.h" #include "llvm/Target/TargetFrameLowering.h" +#include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetTransformImpl.h" namespace llvm { diff --git a/lib/Target/MSP430/MSP430TargetMachine.h b/lib/Target/MSP430/MSP430TargetMachine.h index 186172ede4..8a94d746de 100644 --- a/lib/Target/MSP430/MSP430TargetMachine.h +++ b/lib/Target/MSP430/MSP430TargetMachine.h @@ -15,11 +15,11 @@ #ifndef LLVM_TARGET_MSP430_TARGETMACHINE_H #define LLVM_TARGET_MSP430_TARGETMACHINE_H -#include "MSP430InstrInfo.h" -#include "MSP430ISelLowering.h" #include "MSP430FrameLowering.h" -#include "MSP430SelectionDAGInfo.h" +#include "MSP430ISelLowering.h" +#include "MSP430InstrInfo.h" #include "MSP430RegisterInfo.h" +#include "MSP430SelectionDAGInfo.h" #include "MSP430Subtarget.h" #include "llvm/DataLayout.h" #include "llvm/Target/TargetFrameLowering.h" diff --git a/lib/Target/Mips/Mips16InstrInfo.h b/lib/Target/Mips/Mips16InstrInfo.h index e06ccfe61c..d6ef8d2bf1 100644 --- a/lib/Target/Mips/Mips16InstrInfo.h +++ b/lib/Target/Mips/Mips16InstrInfo.h @@ -14,8 +14,8 @@ #ifndef MIPS16INSTRUCTIONINFO_H #define MIPS16INSTRUCTIONINFO_H -#include "MipsInstrInfo.h" #include "Mips16RegisterInfo.h" +#include "MipsInstrInfo.h" namespace llvm { diff --git a/lib/Target/Mips/MipsAsmPrinter.h b/lib/Target/Mips/MipsAsmPrinter.h index 94d8bfa105..d8fbeeb0e9 100644 --- a/lib/Target/Mips/MipsAsmPrinter.h +++ b/lib/Target/Mips/MipsAsmPrinter.h @@ -14,8 +14,8 @@ #ifndef MIPSASMPRINTER_H #define MIPSASMPRINTER_H -#include "MipsMachineFunction.h" #include "MipsMCInstLower.h" +#include "MipsMachineFunction.h" #include "MipsSubtarget.h" #include "llvm/CodeGen/AsmPrinter.h" #include "llvm/Support/Compiler.h" diff --git a/lib/Target/Mips/MipsMachineFunction.h b/lib/Target/Mips/MipsMachineFunction.h index bb45f92f18..eb6e1cff49 100644 --- a/lib/Target/Mips/MipsMachineFunction.h +++ b/lib/Target/Mips/MipsMachineFunction.h @@ -15,8 +15,8 @@ #define MIPS_MACHINE_FUNCTION_INFO_H #include "MipsSubtarget.h" -#include "llvm/CodeGen/MachineFunction.h" #include "llvm/CodeGen/MachineFrameInfo.h" +#include "llvm/CodeGen/MachineFunction.h" #include "llvm/Target/TargetFrameLowering.h" #include "llvm/Target/TargetMachine.h" #include diff --git a/lib/Target/Mips/MipsSubtarget.h b/lib/Target/Mips/MipsSubtarget.h index ff32219c7d..d042601cda 100644 --- a/lib/Target/Mips/MipsSubtarget.h +++ b/lib/Target/Mips/MipsSubtarget.h @@ -14,8 +14,8 @@ #ifndef MIPSSUBTARGET_H #define MIPSSUBTARGET_H -#include "llvm/Target/TargetSubtargetInfo.h" #include "llvm/MC/MCInstrItineraries.h" +#include "llvm/Target/TargetSubtargetInfo.h" #include #define GET_SUBTARGETINFO_HEADER diff --git a/lib/Target/Mips/MipsTargetMachine.h b/lib/Target/Mips/MipsTargetMachine.h index b54f5cee6d..8b1a06f320 100644 --- a/lib/Target/Mips/MipsTargetMachine.h +++ b/lib/Target/Mips/MipsTargetMachine.h @@ -15,14 +15,14 @@ #define MIPSTARGETMACHINE_H #include "MipsFrameLowering.h" -#include "MipsInstrInfo.h" #include "MipsISelLowering.h" +#include "MipsInstrInfo.h" #include "MipsJITInfo.h" #include "MipsSelectionDAGInfo.h" #include "MipsSubtarget.h" -#include "llvm/Target/TargetMachine.h" #include "llvm/DataLayout.h" #include "llvm/Target/TargetFrameLowering.h" +#include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetTransformImpl.h" namespace llvm { diff --git a/lib/Target/NVPTX/NVPTX.h b/lib/Target/NVPTX/NVPTX.h index a8d082a4d8..b29a2962aa 100644 --- a/lib/Target/NVPTX/NVPTX.h +++ b/lib/Target/NVPTX/NVPTX.h @@ -15,11 +15,11 @@ #ifndef LLVM_TARGET_NVPTX_H #define LLVM_TARGET_NVPTX_H -#include "llvm/Value.h" +#include "MCTargetDesc/NVPTXBaseInfo.h" #include "llvm/Module.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/Target/TargetMachine.h" -#include "MCTargetDesc/NVPTXBaseInfo.h" +#include "llvm/Value.h" #include #include diff --git a/lib/Target/NVPTX/NVPTXAllocaHoisting.h b/lib/Target/NVPTX/NVPTXAllocaHoisting.h index c7cabf6953..768d514dbb 100644 --- a/lib/Target/NVPTX/NVPTXAllocaHoisting.h +++ b/lib/Target/NVPTX/NVPTXAllocaHoisting.h @@ -15,8 +15,8 @@ #define NVPTX_ALLOCA_HOISTING_H_ #include "llvm/CodeGen/MachineFunctionAnalysis.h" -#include "llvm/Pass.h" #include "llvm/DataLayout.h" +#include "llvm/Pass.h" namespace llvm { diff --git a/lib/Target/NVPTX/NVPTXAsmPrinter.h b/lib/Target/NVPTX/NVPTXAsmPrinter.h index 6488b14425..29db4abe6c 100644 --- a/lib/Target/NVPTX/NVPTXAsmPrinter.h +++ b/lib/Target/NVPTX/NVPTXAsmPrinter.h @@ -16,19 +16,19 @@ #define NVPTXASMPRINTER_H #include "NVPTX.h" -#include "NVPTXTargetMachine.h" #include "NVPTXSubtarget.h" -#include "llvm/Function.h" +#include "NVPTXTargetMachine.h" +#include "llvm/ADT/SmallString.h" +#include "llvm/ADT/StringExtras.h" #include "llvm/CodeGen/AsmPrinter.h" -#include "llvm/Support/CommandLine.h" +#include "llvm/Function.h" #include "llvm/MC/MCAsmInfo.h" #include "llvm/MC/MCExpr.h" -#include "llvm/Target/TargetMachine.h" #include "llvm/MC/MCSymbol.h" +#include "llvm/Support/CommandLine.h" #include "llvm/Support/FormattedStream.h" #include "llvm/Target/Mangler.h" -#include "llvm/ADT/SmallString.h" -#include "llvm/ADT/StringExtras.h" +#include "llvm/Target/TargetMachine.h" #include // The ptx syntax and format is very different from that usually seem in a .s diff --git a/lib/Target/NVPTX/NVPTXLowerAggrCopies.h b/lib/Target/NVPTX/NVPTXLowerAggrCopies.h index b150c69815..9bafce274e 100644 --- a/lib/Target/NVPTX/NVPTXLowerAggrCopies.h +++ b/lib/Target/NVPTX/NVPTXLowerAggrCopies.h @@ -15,9 +15,9 @@ #ifndef NVPTX_LOWER_AGGR_COPIES_H #define NVPTX_LOWER_AGGR_COPIES_H -#include "llvm/Pass.h" #include "llvm/CodeGen/MachineFunctionAnalysis.h" #include "llvm/DataLayout.h" +#include "llvm/Pass.h" namespace llvm { diff --git a/lib/Target/NVPTX/NVPTXSection.h b/lib/Target/NVPTX/NVPTXSection.h index f1ca466266..9c832e1b51 100644 --- a/lib/Target/NVPTX/NVPTXSection.h +++ b/lib/Target/NVPTX/NVPTXSection.h @@ -14,8 +14,8 @@ #ifndef LLVM_NVPTXSECTION_H #define LLVM_NVPTXSECTION_H -#include "llvm/MC/MCSection.h" #include "llvm/GlobalVariable.h" +#include "llvm/MC/MCSection.h" #include namespace llvm { diff --git a/lib/Target/NVPTX/NVPTXSplitBBatBar.h b/lib/Target/NVPTX/NVPTXSplitBBatBar.h index 9e4d5a066d..bdafba9075 100644 --- a/lib/Target/NVPTX/NVPTXSplitBBatBar.h +++ b/lib/Target/NVPTX/NVPTXSplitBBatBar.h @@ -15,8 +15,8 @@ #ifndef NVPTX_SPLIT_BB_AT_BAR_H #define NVPTX_SPLIT_BB_AT_BAR_H -#include "llvm/Pass.h" #include "llvm/CodeGen/MachineFunctionAnalysis.h" +#include "llvm/Pass.h" namespace llvm { diff --git a/lib/Target/NVPTX/NVPTXSubtarget.h b/lib/Target/NVPTX/NVPTXSubtarget.h index 3cfd9718e5..e6cb7c2def 100644 --- a/lib/Target/NVPTX/NVPTXSubtarget.h +++ b/lib/Target/NVPTX/NVPTXSubtarget.h @@ -14,8 +14,8 @@ #ifndef NVPTXSUBTARGET_H #define NVPTXSUBTARGET_H -#include "llvm/Target/TargetSubtargetInfo.h" #include "NVPTX.h" +#include "llvm/Target/TargetSubtargetInfo.h" #define GET_SUBTARGETINFO_HEADER #include "NVPTXGenSubtargetInfo.inc" diff --git a/lib/Target/NVPTX/NVPTXTargetMachine.h b/lib/Target/NVPTX/NVPTXTargetMachine.h index 11bc9d4fa6..b4763a5bae 100644 --- a/lib/Target/NVPTX/NVPTXTargetMachine.h +++ b/lib/Target/NVPTX/NVPTXTargetMachine.h @@ -15,12 +15,12 @@ #ifndef NVPTX_TARGETMACHINE_H #define NVPTX_TARGETMACHINE_H -#include "NVPTXInstrInfo.h" +#include "ManagedStringPool.h" +#include "NVPTXFrameLowering.h" #include "NVPTXISelLowering.h" +#include "NVPTXInstrInfo.h" #include "NVPTXRegisterInfo.h" #include "NVPTXSubtarget.h" -#include "NVPTXFrameLowering.h" -#include "ManagedStringPool.h" #include "llvm/DataLayout.h" #include "llvm/Target/TargetFrameLowering.h" #include "llvm/Target/TargetMachine.h" diff --git a/lib/Target/NVPTX/NVPTXUtilities.h b/lib/Target/NVPTX/NVPTXUtilities.h index fe6ad559e9..5ea7bc8640 100644 --- a/lib/Target/NVPTX/NVPTXUtilities.h +++ b/lib/Target/NVPTX/NVPTXUtilities.h @@ -14,10 +14,10 @@ #ifndef NVPTXUTILITIES_H #define NVPTXUTILITIES_H -#include "llvm/Value.h" -#include "llvm/GlobalVariable.h" #include "llvm/Function.h" +#include "llvm/GlobalVariable.h" #include "llvm/IntrinsicInst.h" +#include "llvm/Value.h" #include #include #include diff --git a/lib/Target/PowerPC/PPCFrameLowering.h b/lib/Target/PowerPC/PPCFrameLowering.h index 4d957b91c7..3517d8c086 100644 --- a/lib/Target/PowerPC/PPCFrameLowering.h +++ b/lib/Target/PowerPC/PPCFrameLowering.h @@ -15,9 +15,9 @@ #include "PPC.h" #include "PPCSubtarget.h" +#include "llvm/ADT/STLExtras.h" #include "llvm/Target/TargetFrameLowering.h" #include "llvm/Target/TargetMachine.h" -#include "llvm/ADT/STLExtras.h" namespace llvm { class PPCSubtarget; diff --git a/lib/Target/PowerPC/PPCISelLowering.h b/lib/Target/PowerPC/PPCISelLowering.h index b187f856f3..c20356c041 100644 --- a/lib/Target/PowerPC/PPCISelLowering.h +++ b/lib/Target/PowerPC/PPCISelLowering.h @@ -17,8 +17,8 @@ #include "PPC.h" #include "PPCSubtarget.h" -#include "llvm/Target/TargetLowering.h" #include "llvm/CodeGen/SelectionDAG.h" +#include "llvm/Target/TargetLowering.h" namespace llvm { namespace PPCISD { diff --git a/lib/Target/PowerPC/PPCJITInfo.h b/lib/Target/PowerPC/PPCJITInfo.h index 2f8243a597..46d4a08eb6 100644 --- a/lib/Target/PowerPC/PPCJITInfo.h +++ b/lib/Target/PowerPC/PPCJITInfo.h @@ -14,8 +14,8 @@ #ifndef POWERPC_JITINFO_H #define POWERPC_JITINFO_H -#include "llvm/Target/TargetJITInfo.h" #include "llvm/CodeGen/JITCodeEmitter.h" +#include "llvm/Target/TargetJITInfo.h" namespace llvm { class PPCTargetMachine; diff --git a/lib/Target/PowerPC/PPCSubtarget.h b/lib/Target/PowerPC/PPCSubtarget.h index b9e22f43c3..416c0f3c34 100644 --- a/lib/Target/PowerPC/PPCSubtarget.h +++ b/lib/Target/PowerPC/PPCSubtarget.h @@ -14,9 +14,9 @@ #ifndef POWERPCSUBTARGET_H #define POWERPCSUBTARGET_H -#include "llvm/Target/TargetSubtargetInfo.h" -#include "llvm/MC/MCInstrItineraries.h" #include "llvm/ADT/Triple.h" +#include "llvm/MC/MCInstrItineraries.h" +#include "llvm/Target/TargetSubtargetInfo.h" #include #define GET_SUBTARGETINFO_HEADER diff --git a/lib/Target/PowerPC/PPCTargetMachine.h b/lib/Target/PowerPC/PPCTargetMachine.h index c168433a71..0267ed1f23 100644 --- a/lib/Target/PowerPC/PPCTargetMachine.h +++ b/lib/Target/PowerPC/PPCTargetMachine.h @@ -15,14 +15,14 @@ #define PPC_TARGETMACHINE_H #include "PPCFrameLowering.h" -#include "PPCSubtarget.h" -#include "PPCJITInfo.h" -#include "PPCInstrInfo.h" #include "PPCISelLowering.h" +#include "PPCInstrInfo.h" +#include "PPCJITInfo.h" #include "PPCSelectionDAGInfo.h" +#include "PPCSubtarget.h" +#include "llvm/DataLayout.h" #include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetTransformImpl.h" -#include "llvm/DataLayout.h" namespace llvm { diff --git a/lib/Target/Sparc/SparcTargetMachine.h b/lib/Target/Sparc/SparcTargetMachine.h index 0fbe2d7cda..53cf276a3e 100644 --- a/lib/Target/Sparc/SparcTargetMachine.h +++ b/lib/Target/Sparc/SparcTargetMachine.h @@ -14,14 +14,14 @@ #ifndef SPARCTARGETMACHINE_H #define SPARCTARGETMACHINE_H -#include "SparcInstrInfo.h" -#include "SparcISelLowering.h" #include "SparcFrameLowering.h" +#include "SparcISelLowering.h" +#include "SparcInstrInfo.h" #include "SparcSelectionDAGInfo.h" #include "SparcSubtarget.h" -#include "llvm/Target/TargetMachine.h" #include "llvm/DataLayout.h" #include "llvm/Target/TargetFrameLowering.h" +#include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetTransformImpl.h" namespace llvm { diff --git a/lib/Target/X86/X86COFFMachineModuleInfo.h b/lib/Target/X86/X86COFFMachineModuleInfo.h index a5a8dc18e4..0dfeb42f1a 100644 --- a/lib/Target/X86/X86COFFMachineModuleInfo.h +++ b/lib/Target/X86/X86COFFMachineModuleInfo.h @@ -15,8 +15,8 @@ #define X86COFF_MACHINEMODULEINFO_H #include "X86MachineFunctionInfo.h" -#include "llvm/CodeGen/MachineModuleInfo.h" #include "llvm/ADT/DenseSet.h" +#include "llvm/CodeGen/MachineModuleInfo.h" namespace llvm { class X86MachineFunctionInfo; diff --git a/lib/Target/X86/X86ISelLowering.h b/lib/Target/X86/X86ISelLowering.h index 06733680a8..2988cee037 100644 --- a/lib/Target/X86/X86ISelLowering.h +++ b/lib/Target/X86/X86ISelLowering.h @@ -15,15 +15,15 @@ #ifndef X86ISELLOWERING_H #define X86ISELLOWERING_H -#include "X86Subtarget.h" -#include "X86RegisterInfo.h" #include "X86MachineFunctionInfo.h" -#include "llvm/Target/TargetLowering.h" -#include "llvm/Target/TargetTransformImpl.h" -#include "llvm/Target/TargetOptions.h" +#include "X86RegisterInfo.h" +#include "X86Subtarget.h" +#include "llvm/CodeGen/CallingConvLower.h" #include "llvm/CodeGen/FastISel.h" #include "llvm/CodeGen/SelectionDAG.h" -#include "llvm/CodeGen/CallingConvLower.h" +#include "llvm/Target/TargetLowering.h" +#include "llvm/Target/TargetOptions.h" +#include "llvm/Target/TargetTransformImpl.h" namespace llvm { namespace X86ISD { diff --git a/lib/Target/X86/X86JITInfo.h b/lib/Target/X86/X86JITInfo.h index d7c08dfb0f..7b0f3434d0 100644 --- a/lib/Target/X86/X86JITInfo.h +++ b/lib/Target/X86/X86JITInfo.h @@ -14,8 +14,8 @@ #ifndef X86JITINFO_H #define X86JITINFO_H -#include "llvm/Function.h" #include "llvm/CodeGen/JITCodeEmitter.h" +#include "llvm/Function.h" #include "llvm/Target/TargetJITInfo.h" namespace llvm { diff --git a/lib/Target/X86/X86Subtarget.h b/lib/Target/X86/X86Subtarget.h index 9bac772d10..7e9af2614c 100644 --- a/lib/Target/X86/X86Subtarget.h +++ b/lib/Target/X86/X86Subtarget.h @@ -14,8 +14,8 @@ #ifndef X86SUBTARGET_H #define X86SUBTARGET_H -#include "llvm/CallingConv.h" #include "llvm/ADT/Triple.h" +#include "llvm/CallingConv.h" #include "llvm/Target/TargetSubtargetInfo.h" #include diff --git a/lib/Target/X86/X86TargetMachine.h b/lib/Target/X86/X86TargetMachine.h index 3f60c95092..792f721e76 100644 --- a/lib/Target/X86/X86TargetMachine.h +++ b/lib/Target/X86/X86TargetMachine.h @@ -15,15 +15,15 @@ #define X86TARGETMACHINE_H #include "X86.h" -#include "X86InstrInfo.h" -#include "X86ISelLowering.h" #include "X86FrameLowering.h" +#include "X86ISelLowering.h" +#include "X86InstrInfo.h" #include "X86JITInfo.h" #include "X86SelectionDAGInfo.h" #include "X86Subtarget.h" -#include "llvm/Target/TargetMachine.h" #include "llvm/DataLayout.h" #include "llvm/Target/TargetFrameLowering.h" +#include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetTransformImpl.h" namespace llvm { diff --git a/lib/Target/X86/X86TargetObjectFile.h b/lib/Target/X86/X86TargetObjectFile.h index 2e12703ea0..9d26d389d4 100644 --- a/lib/Target/X86/X86TargetObjectFile.h +++ b/lib/Target/X86/X86TargetObjectFile.h @@ -11,8 +11,8 @@ #define LLVM_TARGET_X86_TARGETOBJECTFILE_H #include "llvm/CodeGen/TargetLoweringObjectFileImpl.h" -#include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetLoweringObjectFile.h" +#include "llvm/Target/TargetMachine.h" namespace llvm { diff --git a/lib/Target/XCore/XCoreMachineFunctionInfo.h b/lib/Target/XCore/XCoreMachineFunctionInfo.h index f869fcf26d..69d5de3e03 100644 --- a/lib/Target/XCore/XCoreMachineFunctionInfo.h +++ b/lib/Target/XCore/XCoreMachineFunctionInfo.h @@ -14,8 +14,8 @@ #ifndef XCOREMACHINEFUNCTIONINFO_H #define XCOREMACHINEFUNCTIONINFO_H -#include "llvm/CodeGen/MachineFunction.h" #include "llvm/CodeGen/MachineFrameInfo.h" +#include "llvm/CodeGen/MachineFunction.h" #include namespace llvm { diff --git a/lib/Target/XCore/XCoreSubtarget.h b/lib/Target/XCore/XCoreSubtarget.h index 8d0f254e08..5ac4dbc4bc 100644 --- a/lib/Target/XCore/XCoreSubtarget.h +++ b/lib/Target/XCore/XCoreSubtarget.h @@ -14,8 +14,8 @@ #ifndef XCORESUBTARGET_H #define XCORESUBTARGET_H -#include "llvm/Target/TargetSubtargetInfo.h" #include "llvm/Target/TargetMachine.h" +#include "llvm/Target/TargetSubtargetInfo.h" #include #define GET_SUBTARGETINFO_HEADER diff --git a/lib/Target/XCore/XCoreTargetMachine.h b/lib/Target/XCore/XCoreTargetMachine.h index c60c6a37f9..42bfcb4a03 100644 --- a/lib/Target/XCore/XCoreTargetMachine.h +++ b/lib/Target/XCore/XCoreTargetMachine.h @@ -15,13 +15,13 @@ #define XCORETARGETMACHINE_H #include "XCoreFrameLowering.h" -#include "XCoreSubtarget.h" -#include "XCoreInstrInfo.h" #include "XCoreISelLowering.h" +#include "XCoreInstrInfo.h" #include "XCoreSelectionDAGInfo.h" +#include "XCoreSubtarget.h" +#include "llvm/DataLayout.h" #include "llvm/Target/TargetMachine.h" #include "llvm/Target/TargetTransformImpl.h" -#include "llvm/DataLayout.h" namespace llvm { diff --git a/lib/Transforms/InstCombine/InstCombine.h b/lib/Transforms/InstCombine/InstCombine.h index ff5eeb6192..0570104205 100644 --- a/lib/Transforms/InstCombine/InstCombine.h +++ b/lib/Transforms/InstCombine/InstCombine.h @@ -11,12 +11,12 @@ #define INSTCOMBINE_INSTCOMBINE_H #include "InstCombineWorklist.h" +#include "llvm/Analysis/ValueTracking.h" #include "llvm/IRBuilder.h" #include "llvm/InstVisitor.h" #include "llvm/IntrinsicInst.h" #include "llvm/Operator.h" #include "llvm/Pass.h" -#include "llvm/Analysis/ValueTracking.h" #include "llvm/Support/TargetFolder.h" #include "llvm/Transforms/Utils/SimplifyLibCalls.h" diff --git a/lib/Transforms/InstCombine/InstCombineWorklist.h b/lib/Transforms/InstCombine/InstCombineWorklist.h index ea654ae9ed..b1a4966920 100644 --- a/lib/Transforms/InstCombine/InstCombineWorklist.h +++ b/lib/Transforms/InstCombine/InstCombineWorklist.h @@ -11,11 +11,11 @@ #define INSTCOMBINE_WORKLIST_H #define DEBUG_TYPE "instcombine" +#include "llvm/ADT/DenseMap.h" +#include "llvm/ADT/SmallVector.h" #include "llvm/Instruction.h" -#include "llvm/Support/Debug.h" #include "llvm/Support/Compiler.h" -#include "llvm/ADT/SmallVector.h" -#include "llvm/ADT/DenseMap.h" +#include "llvm/Support/Debug.h" #include "llvm/Support/raw_ostream.h" namespace llvm { diff --git a/lib/Transforms/Instrumentation/MaximumSpanningTree.h b/lib/Transforms/Instrumentation/MaximumSpanningTree.h index a4bb5a66af..50226db8c2 100644 --- a/lib/Transforms/Instrumentation/MaximumSpanningTree.h +++ b/lib/Transforms/Instrumentation/MaximumSpanningTree.h @@ -15,10 +15,10 @@ #ifndef LLVM_ANALYSIS_MAXIMUMSPANNINGTREE_H #define LLVM_ANALYSIS_MAXIMUMSPANNINGTREE_H -#include "llvm/BasicBlock.h" #include "llvm/ADT/EquivalenceClasses.h" -#include +#include "llvm/BasicBlock.h" #include +#include namespace llvm { diff --git a/lib/VMCore/AttributesImpl.h b/lib/VMCore/AttributesImpl.h index 5c107e1ebb..193e873717 100644 --- a/lib/VMCore/AttributesImpl.h +++ b/lib/VMCore/AttributesImpl.h @@ -15,8 +15,8 @@ #ifndef LLVM_ATTRIBUTESIMPL_H #define LLVM_ATTRIBUTESIMPL_H -#include "llvm/Attributes.h" #include "llvm/ADT/FoldingSet.h" +#include "llvm/Attributes.h" namespace llvm { diff --git a/lib/VMCore/LLVMContextImpl.h b/lib/VMCore/LLVMContextImpl.h index d4c28b435a..aafbfc49e9 100644 --- a/lib/VMCore/LLVMContextImpl.h +++ b/lib/VMCore/LLVMContextImpl.h @@ -15,22 +15,22 @@ #ifndef LLVM_LLVMCONTEXT_IMPL_H #define LLVM_LLVMCONTEXT_IMPL_H -#include "llvm/LLVMContext.h" #include "AttributesImpl.h" #include "ConstantsContext.h" #include "LeaksContext.h" -#include "llvm/Constants.h" -#include "llvm/DerivedTypes.h" -#include "llvm/Metadata.h" -#include "llvm/Support/ValueHandle.h" #include "llvm/ADT/APFloat.h" #include "llvm/ADT/APInt.h" #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/FoldingSet.h" +#include "llvm/ADT/Hashing.h" #include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/StringMap.h" -#include "llvm/ADT/Hashing.h" +#include "llvm/Constants.h" +#include "llvm/DerivedTypes.h" +#include "llvm/LLVMContext.h" +#include "llvm/Metadata.h" +#include "llvm/Support/ValueHandle.h" #include namespace llvm { -- cgit v1.2.3-70-g09d2 From 99faa3b4ec6d03ac7808fe4ff3fbf3d04e375502 Mon Sep 17 00:00:00 2001 From: Bill Wendling Date: Fri, 7 Dec 2012 23:16:57 +0000 Subject: s/AttrListPtr/AttributeSet/g to better label what this class is going to be in the near future. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169651 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Attributes.h | 24 +++++----- include/llvm/Function.h | 8 ++-- include/llvm/Instructions.h | 34 +++++++------- include/llvm/Intrinsics.h | 4 +- include/llvm/Module.h | 6 +-- include/llvm/Support/CallSite.h | 4 +- include/llvm/Transforms/Utils/BuildLibCalls.h | 2 +- lib/AsmParser/LLParser.cpp | 18 ++++---- lib/Bitcode/Reader/BitcodeReader.cpp | 8 ++-- lib/Bitcode/Reader/BitcodeReader.h | 6 +-- lib/Bitcode/Writer/BitcodeWriter.cpp | 4 +- lib/Bitcode/Writer/ValueEnumerator.cpp | 2 +- lib/Bitcode/Writer/ValueEnumerator.h | 10 ++-- lib/Target/CppBackend/CPPBackend.cpp | 8 ++-- lib/Target/MBlaze/MBlazeIntrinsicInfo.cpp | 2 +- lib/Target/NVPTX/NVPTXAsmPrinter.cpp | 2 +- lib/Target/NVPTX/NVPTXISelLowering.cpp | 2 +- lib/Target/X86/X86ISelLowering.cpp | 2 +- lib/Target/XCore/XCoreFrameLowering.cpp | 2 +- lib/Transforms/IPO/ArgumentPromotion.cpp | 18 ++++---- lib/Transforms/IPO/DeadArgumentElimination.cpp | 22 ++++----- lib/Transforms/IPO/FunctionAttrs.cpp | 4 +- lib/Transforms/IPO/GlobalOpt.cpp | 2 +- lib/Transforms/IPO/PruneEH.cpp | 4 +- lib/Transforms/InstCombine/InstCombineCalls.cpp | 18 ++++---- lib/Transforms/Instrumentation/MemorySanitizer.cpp | 4 +- lib/Transforms/Scalar/ObjCARC.cpp | 34 +++++++------- lib/Transforms/Utils/BuildLibCalls.cpp | 54 +++++++++++----------- lib/Transforms/Utils/CloneFunction.cpp | 4 +- lib/VMCore/AsmWriter.cpp | 6 +-- lib/VMCore/Attributes.cpp | 32 ++++++------- lib/VMCore/Core.cpp | 14 +++--- lib/VMCore/Function.cpp | 4 +- lib/VMCore/Instructions.cpp | 16 +++---- lib/VMCore/Module.cpp | 10 ++-- lib/VMCore/Verifier.cpp | 10 ++-- unittests/VMCore/PassManagerTest.cpp | 14 +++--- utils/TableGen/IntrinsicEmitter.cpp | 10 ++-- 38 files changed, 214 insertions(+), 214 deletions(-) (limited to 'lib/Bitcode/Reader/BitcodeReader.h') diff --git a/include/llvm/Attributes.h b/include/llvm/Attributes.h index 1059c6d5ff..ed18ca4c40 100644 --- a/include/llvm/Attributes.h +++ b/include/llvm/Attributes.h @@ -298,14 +298,14 @@ struct AttributeWithIndex { }; //===----------------------------------------------------------------------===// -// AttrListPtr Smart Pointer +// AttributeSet Smart Pointer //===----------------------------------------------------------------------===// class AttributeListImpl; -/// AttrListPtr - This class manages the ref count for the opaque +/// AttributeSet - This class manages the ref count for the opaque /// AttributeListImpl object and provides accessors for it. -class AttrListPtr { +class AttributeSet { public: enum AttrIndex { ReturnIndex = 0U, @@ -320,28 +320,28 @@ private: /// for the result are denoted with Idx = 0. Attributes getAttributes(unsigned Idx) const; - explicit AttrListPtr(AttributeListImpl *LI) : AttrList(LI) {} + explicit AttributeSet(AttributeListImpl *LI) : AttrList(LI) {} public: - AttrListPtr() : AttrList(0) {} - AttrListPtr(const AttrListPtr &P) : AttrList(P.AttrList) {} - const AttrListPtr &operator=(const AttrListPtr &RHS); + AttributeSet() : AttrList(0) {} + AttributeSet(const AttributeSet &P) : AttrList(P.AttrList) {} + const AttributeSet &operator=(const AttributeSet &RHS); //===--------------------------------------------------------------------===// // Attribute List Construction and Mutation //===--------------------------------------------------------------------===// /// get - Return a Attributes list with the specified parameters in it. - static AttrListPtr get(LLVMContext &C, ArrayRef Attrs); + static AttributeSet get(LLVMContext &C, ArrayRef Attrs); /// addAttr - Add the specified attribute at the specified index to this /// attribute list. Since attribute lists are immutable, this /// returns the new list. - AttrListPtr addAttr(LLVMContext &C, unsigned Idx, Attributes Attrs) const; + AttributeSet addAttr(LLVMContext &C, unsigned Idx, Attributes Attrs) const; /// removeAttr - Remove the specified attribute at the specified index from /// this attribute list. Since attribute lists are immutable, this /// returns the new list. - AttrListPtr removeAttr(LLVMContext &C, unsigned Idx, Attributes Attrs) const; + AttributeSet removeAttr(LLVMContext &C, unsigned Idx, Attributes Attrs) const; //===--------------------------------------------------------------------===// // Attribute List Accessors @@ -383,9 +383,9 @@ public: Attributes &getAttributesAtIndex(unsigned i) const; /// operator==/!= - Provide equality predicates. - bool operator==(const AttrListPtr &RHS) const + bool operator==(const AttributeSet &RHS) const { return AttrList == RHS.AttrList; } - bool operator!=(const AttrListPtr &RHS) const + bool operator!=(const AttributeSet &RHS) const { return AttrList != RHS.AttrList; } //===--------------------------------------------------------------------===// diff --git a/include/llvm/Function.h b/include/llvm/Function.h index d864711046..b49b8c1457 100644 --- a/include/llvm/Function.h +++ b/include/llvm/Function.h @@ -85,7 +85,7 @@ private: BasicBlockListType BasicBlocks; ///< The basic blocks mutable ArgumentListType ArgumentList; ///< The formal arguments ValueSymbolTable *SymTab; ///< Symbol table of args/instructions - AttrListPtr AttributeList; ///< Parameter attributes + AttributeSet AttributeList; ///< Parameter attributes // HasLazyArguments is stored in Value::SubclassData. /*bool HasLazyArguments;*/ @@ -162,11 +162,11 @@ public: /// getAttributes - Return the attribute list for this Function. /// - const AttrListPtr &getAttributes() const { return AttributeList; } + const AttributeSet &getAttributes() const { return AttributeList; } /// setAttributes - Set the attribute list for this Function. /// - void setAttributes(const AttrListPtr &attrs) { AttributeList = attrs; } + void setAttributes(const AttributeSet &attrs) { AttributeList = attrs; } /// getFnAttributes - Return the function attributes for querying. /// @@ -178,7 +178,7 @@ public: /// void addFnAttr(Attributes::AttrVal N) { // Function Attributes are stored at ~0 index - addAttribute(AttrListPtr::FunctionIndex, Attributes::get(getContext(), N)); + addAttribute(AttributeSet::FunctionIndex, Attributes::get(getContext(), N)); } /// removeFnAttr - Remove function attributes from this function. diff --git a/include/llvm/Instructions.h b/include/llvm/Instructions.h index 631f58bd38..9c5a2db2fe 100644 --- a/include/llvm/Instructions.h +++ b/include/llvm/Instructions.h @@ -1156,7 +1156,7 @@ public: /// hold the calling convention of the call. /// class CallInst : public Instruction { - AttrListPtr AttributeList; ///< parameter attributes for call + AttributeSet AttributeList; ///< parameter attributes for call CallInst(const CallInst &CI); void init(Value *Func, ArrayRef Args, const Twine &NameStr); void init(Value *Func, const Twine &NameStr); @@ -1254,11 +1254,11 @@ public: /// getAttributes - Return the parameter attributes for this call. /// - const AttrListPtr &getAttributes() const { return AttributeList; } + const AttributeSet &getAttributes() const { return AttributeList; } /// setAttributes - Set the parameter attributes for this call. /// - void setAttributes(const AttrListPtr &Attrs) { AttributeList = Attrs; } + void setAttributes(const AttributeSet &Attrs) { AttributeList = Attrs; } /// addAttribute - adds the attribute to the list of attributes. void addAttribute(unsigned i, Attributes attr); @@ -1280,7 +1280,7 @@ public: /// \brief Return true if the call should not be inlined. bool isNoInline() const { return hasFnAttr(Attributes::NoInline); } void setIsNoInline() { - addAttribute(AttrListPtr::FunctionIndex, + addAttribute(AttributeSet::FunctionIndex, Attributes::get(getContext(), Attributes::NoInline)); } @@ -1289,7 +1289,7 @@ public: return hasFnAttr(Attributes::ReturnsTwice); } void setCanReturnTwice() { - addAttribute(AttrListPtr::FunctionIndex, + addAttribute(AttributeSet::FunctionIndex, Attributes::get(getContext(), Attributes::ReturnsTwice)); } @@ -1298,7 +1298,7 @@ public: return hasFnAttr(Attributes::ReadNone); } void setDoesNotAccessMemory() { - addAttribute(AttrListPtr::FunctionIndex, + addAttribute(AttributeSet::FunctionIndex, Attributes::get(getContext(), Attributes::ReadNone)); } @@ -1307,21 +1307,21 @@ public: return doesNotAccessMemory() || hasFnAttr(Attributes::ReadOnly); } void setOnlyReadsMemory() { - addAttribute(AttrListPtr::FunctionIndex, + addAttribute(AttributeSet::FunctionIndex, Attributes::get(getContext(), Attributes::ReadOnly)); } /// \brief Determine if the call cannot return. bool doesNotReturn() const { return hasFnAttr(Attributes::NoReturn); } void setDoesNotReturn() { - addAttribute(AttrListPtr::FunctionIndex, + addAttribute(AttributeSet::FunctionIndex, Attributes::get(getContext(), Attributes::NoReturn)); } /// \brief Determine if the call cannot unwind. bool doesNotThrow() const { return hasFnAttr(Attributes::NoUnwind); } void setDoesNotThrow() { - addAttribute(AttrListPtr::FunctionIndex, + addAttribute(AttributeSet::FunctionIndex, Attributes::get(getContext(), Attributes::NoUnwind)); } @@ -2942,7 +2942,7 @@ DEFINE_TRANSPARENT_OPERAND_ACCESSORS(IndirectBrInst, Value) /// calling convention of the call. /// class InvokeInst : public TerminatorInst { - AttrListPtr AttributeList; + AttributeSet AttributeList; InvokeInst(const InvokeInst &BI); void init(Value *Func, BasicBlock *IfNormal, BasicBlock *IfException, ArrayRef Args, const Twine &NameStr); @@ -3003,11 +3003,11 @@ public: /// getAttributes - Return the parameter attributes for this invoke. /// - const AttrListPtr &getAttributes() const { return AttributeList; } + const AttributeSet &getAttributes() const { return AttributeList; } /// setAttributes - Set the parameter attributes for this invoke. /// - void setAttributes(const AttrListPtr &Attrs) { AttributeList = Attrs; } + void setAttributes(const AttributeSet &Attrs) { AttributeList = Attrs; } /// addAttribute - adds the attribute to the list of attributes. void addAttribute(unsigned i, Attributes attr); @@ -3029,7 +3029,7 @@ public: /// \brief Return true if the call should not be inlined. bool isNoInline() const { return hasFnAttr(Attributes::NoInline); } void setIsNoInline() { - addAttribute(AttrListPtr::FunctionIndex, + addAttribute(AttributeSet::FunctionIndex, Attributes::get(getContext(), Attributes::NoInline)); } @@ -3038,7 +3038,7 @@ public: return hasFnAttr(Attributes::ReadNone); } void setDoesNotAccessMemory() { - addAttribute(AttrListPtr::FunctionIndex, + addAttribute(AttributeSet::FunctionIndex, Attributes::get(getContext(), Attributes::ReadNone)); } @@ -3047,21 +3047,21 @@ public: return doesNotAccessMemory() || hasFnAttr(Attributes::ReadOnly); } void setOnlyReadsMemory() { - addAttribute(AttrListPtr::FunctionIndex, + addAttribute(AttributeSet::FunctionIndex, Attributes::get(getContext(), Attributes::ReadOnly)); } /// \brief Determine if the call cannot return. bool doesNotReturn() const { return hasFnAttr(Attributes::NoReturn); } void setDoesNotReturn() { - addAttribute(AttrListPtr::FunctionIndex, + addAttribute(AttributeSet::FunctionIndex, Attributes::get(getContext(), Attributes::NoReturn)); } /// \brief Determine if the call cannot unwind. bool doesNotThrow() const { return hasFnAttr(Attributes::NoUnwind); } void setDoesNotThrow() { - addAttribute(AttrListPtr::FunctionIndex, + addAttribute(AttributeSet::FunctionIndex, Attributes::get(getContext(), Attributes::NoUnwind)); } diff --git a/include/llvm/Intrinsics.h b/include/llvm/Intrinsics.h index 3108a8e525..c1fe4c67c4 100644 --- a/include/llvm/Intrinsics.h +++ b/include/llvm/Intrinsics.h @@ -26,7 +26,7 @@ class FunctionType; class Function; class LLVMContext; class Module; -class AttrListPtr; +class AttributeSet; /// Intrinsic Namespace - This namespace contains an enum with a value for /// every intrinsic/builtin function known by LLVM. These enum values are @@ -58,7 +58,7 @@ namespace Intrinsic { /// Intrinsic::getAttributes(ID) - Return the attributes for an intrinsic. /// - AttrListPtr getAttributes(LLVMContext &C, ID id); + AttributeSet getAttributes(LLVMContext &C, ID id); /// Intrinsic::getDeclaration(M, ID) - Create or insert an LLVM Function /// declaration for an intrinsic, and return it. diff --git a/include/llvm/Module.h b/include/llvm/Module.h index e0cb32b022..92109024c0 100644 --- a/include/llvm/Module.h +++ b/include/llvm/Module.h @@ -312,7 +312,7 @@ public: /// 4. Finally, the function exists but has the wrong prototype: return the /// function with a constantexpr cast to the right prototype. Constant *getOrInsertFunction(StringRef Name, FunctionType *T, - AttrListPtr AttributeList); + AttributeSet AttributeList); Constant *getOrInsertFunction(StringRef Name, FunctionType *T); @@ -324,7 +324,7 @@ public: /// null terminated list of function arguments, which makes it easier for /// clients to use. Constant *getOrInsertFunction(StringRef Name, - AttrListPtr AttributeList, + AttributeSet AttributeList, Type *RetTy, ...) END_WITH_NULL; /// getOrInsertFunction - Same as above, but without the attributes. @@ -333,7 +333,7 @@ public: Constant *getOrInsertTargetIntrinsic(StringRef Name, FunctionType *Ty, - AttrListPtr AttributeList); + AttributeSet AttributeList); /// getFunction - Look up the specified function in the module symbol table. /// If it does not exist, return null. diff --git a/include/llvm/Support/CallSite.h b/include/llvm/Support/CallSite.h index 9cabf52d74..7a0b8db9bb 100644 --- a/include/llvm/Support/CallSite.h +++ b/include/llvm/Support/CallSite.h @@ -177,10 +177,10 @@ public: /// getAttributes/setAttributes - get or set the parameter attributes of /// the call. - const AttrListPtr &getAttributes() const { + const AttributeSet &getAttributes() const { CALLSITE_DELEGATE_GETTER(getAttributes()); } - void setAttributes(const AttrListPtr &PAL) { + void setAttributes(const AttributeSet &PAL) { CALLSITE_DELEGATE_SETTER(setAttributes(PAL)); } diff --git a/include/llvm/Transforms/Utils/BuildLibCalls.h b/include/llvm/Transforms/Utils/BuildLibCalls.h index ab9fc475fa..d5e7e87839 100644 --- a/include/llvm/Transforms/Utils/BuildLibCalls.h +++ b/include/llvm/Transforms/Utils/BuildLibCalls.h @@ -81,7 +81,7 @@ namespace llvm { /// 'l' is added as the suffix of name, if 'Op' is a float, we add a 'f' /// suffix. Value *EmitUnaryFloatFnCall(Value *Op, StringRef Name, IRBuilder<> &B, - const AttrListPtr &Attrs); + const AttributeSet &Attrs); /// EmitPutChar - Emit a call to the putchar function. This assumes that Char /// is an integer. diff --git a/lib/AsmParser/LLParser.cpp b/lib/AsmParser/LLParser.cpp index e854ddb05e..16b955d58f 100644 --- a/lib/AsmParser/LLParser.cpp +++ b/lib/AsmParser/LLParser.cpp @@ -2813,7 +2813,7 @@ bool LLParser::ParseFunctionHeader(Function *&Fn, bool isDefine) { if (RetAttrs.hasAttributes()) Attrs.push_back( - AttributeWithIndex::get(AttrListPtr::ReturnIndex, + AttributeWithIndex::get(AttributeSet::ReturnIndex, Attributes::get(RetType->getContext(), RetAttrs))); @@ -2825,11 +2825,11 @@ bool LLParser::ParseFunctionHeader(Function *&Fn, bool isDefine) { if (FuncAttrs.hasAttributes()) Attrs.push_back( - AttributeWithIndex::get(AttrListPtr::FunctionIndex, + AttributeWithIndex::get(AttributeSet::FunctionIndex, Attributes::get(RetType->getContext(), FuncAttrs))); - AttrListPtr PAL = AttrListPtr::get(Context, Attrs); + AttributeSet PAL = AttributeSet::get(Context, Attrs); if (PAL.getParamAttributes(1).hasAttribute(Attributes::StructRet) && !RetType->isVoidTy()) @@ -3358,7 +3358,7 @@ bool LLParser::ParseInvoke(Instruction *&Inst, PerFunctionState &PFS) { SmallVector Attrs; if (RetAttrs.hasAttributes()) Attrs.push_back( - AttributeWithIndex::get(AttrListPtr::ReturnIndex, + AttributeWithIndex::get(AttributeSet::ReturnIndex, Attributes::get(Callee->getContext(), RetAttrs))); @@ -3389,12 +3389,12 @@ bool LLParser::ParseInvoke(Instruction *&Inst, PerFunctionState &PFS) { if (FnAttrs.hasAttributes()) Attrs.push_back( - AttributeWithIndex::get(AttrListPtr::FunctionIndex, + AttributeWithIndex::get(AttributeSet::FunctionIndex, Attributes::get(Callee->getContext(), FnAttrs))); // Finish off the Attributes and check them - AttrListPtr PAL = AttrListPtr::get(Context, Attrs); + AttributeSet PAL = AttributeSet::get(Context, Attrs); InvokeInst *II = InvokeInst::Create(Callee, NormalBB, UnwindBB, Args); II->setCallingConv(CC); @@ -3760,7 +3760,7 @@ bool LLParser::ParseCall(Instruction *&Inst, PerFunctionState &PFS, SmallVector Attrs; if (RetAttrs.hasAttributes()) Attrs.push_back( - AttributeWithIndex::get(AttrListPtr::ReturnIndex, + AttributeWithIndex::get(AttributeSet::ReturnIndex, Attributes::get(Callee->getContext(), RetAttrs))); @@ -3791,12 +3791,12 @@ bool LLParser::ParseCall(Instruction *&Inst, PerFunctionState &PFS, if (FnAttrs.hasAttributes()) Attrs.push_back( - AttributeWithIndex::get(AttrListPtr::FunctionIndex, + AttributeWithIndex::get(AttributeSet::FunctionIndex, Attributes::get(Callee->getContext(), FnAttrs))); // Finish off the Attributes and check them - AttrListPtr PAL = AttrListPtr::get(Context, Attrs); + AttributeSet PAL = AttributeSet::get(Context, Attrs); CallInst *CI = CallInst::Create(Callee, Args); CI->setTailCall(isTail); diff --git a/lib/Bitcode/Reader/BitcodeReader.cpp b/lib/Bitcode/Reader/BitcodeReader.cpp index 95fc9ca620..cb1a835185 100644 --- a/lib/Bitcode/Reader/BitcodeReader.cpp +++ b/lib/Bitcode/Reader/BitcodeReader.cpp @@ -47,7 +47,7 @@ void BitcodeReader::FreeState() { ValueList.clear(); MDValueList.clear(); - std::vector().swap(MAttributes); + std::vector().swap(MAttributes); std::vector().swap(FunctionBBs); std::vector().swap(FunctionsWithBodies); DeferredFunctionInfo.clear(); @@ -487,7 +487,7 @@ bool BitcodeReader::ParseAttributeBlock() { Attributes::get(Context, B))); } - MAttributes.push_back(AttrListPtr::get(Context, Attrs)); + MAttributes.push_back(AttributeSet::get(Context, Attrs)); Attrs.clear(); break; } @@ -2398,7 +2398,7 @@ bool BitcodeReader::ParseFunctionBody(Function *F) { case bitc::FUNC_CODE_INST_INVOKE: { // INVOKE: [attrs, cc, normBB, unwindBB, fnty, op0,op1,op2, ...] if (Record.size() < 4) return Error("Invalid INVOKE record"); - AttrListPtr PAL = getAttributes(Record[0]); + AttributeSet PAL = getAttributes(Record[0]); unsigned CCInfo = Record[1]; BasicBlock *NormalBB = getBasicBlock(Record[2]); BasicBlock *UnwindBB = getBasicBlock(Record[3]); @@ -2663,7 +2663,7 @@ bool BitcodeReader::ParseFunctionBody(Function *F) { if (Record.size() < 3) return Error("Invalid CALL record"); - AttrListPtr PAL = getAttributes(Record[0]); + AttributeSet PAL = getAttributes(Record[0]); unsigned CCInfo = Record[1]; unsigned OpNum = 2; diff --git a/lib/Bitcode/Reader/BitcodeReader.h b/lib/Bitcode/Reader/BitcodeReader.h index 34e96b07b4..6d27eff128 100644 --- a/lib/Bitcode/Reader/BitcodeReader.h +++ b/lib/Bitcode/Reader/BitcodeReader.h @@ -146,7 +146,7 @@ class BitcodeReader : public GVMaterializer { /// MAttributes - The set of attributes by index. Index zero in the /// file is for null, and is thus not represented here. As such all indices /// are off by one. - std::vector MAttributes; + std::vector MAttributes; /// FunctionBBs - While parsing a function body, this is a list of the basic /// blocks for the function. @@ -246,10 +246,10 @@ private: if (ID >= FunctionBBs.size()) return 0; // Invalid ID return FunctionBBs[ID]; } - AttrListPtr getAttributes(unsigned i) const { + AttributeSet getAttributes(unsigned i) const { if (i-1 < MAttributes.size()) return MAttributes[i-1]; - return AttrListPtr(); + return AttributeSet(); } /// getValueTypePair - Read a value/type pair out of the specified record from diff --git a/lib/Bitcode/Writer/BitcodeWriter.cpp b/lib/Bitcode/Writer/BitcodeWriter.cpp index dec28f4ada..d616eda9b9 100644 --- a/lib/Bitcode/Writer/BitcodeWriter.cpp +++ b/lib/Bitcode/Writer/BitcodeWriter.cpp @@ -164,14 +164,14 @@ static void WriteStringRecord(unsigned Code, StringRef Str, // Emit information about parameter attributes. static void WriteAttributeTable(const ValueEnumerator &VE, BitstreamWriter &Stream) { - const std::vector &Attrs = VE.getAttributes(); + const std::vector &Attrs = VE.getAttributes(); if (Attrs.empty()) return; Stream.EnterSubblock(bitc::PARAMATTR_BLOCK_ID, 3); SmallVector Record; for (unsigned i = 0, e = Attrs.size(); i != e; ++i) { - const AttrListPtr &A = Attrs[i]; + const AttributeSet &A = Attrs[i]; for (unsigned i = 0, e = A.getNumSlots(); i != e; ++i) { const AttributeWithIndex &PAWI = A.getSlot(i); Record.push_back(PAWI.Index); diff --git a/lib/Bitcode/Writer/ValueEnumerator.cpp b/lib/Bitcode/Writer/ValueEnumerator.cpp index 04877bb786..3c2cce0a16 100644 --- a/lib/Bitcode/Writer/ValueEnumerator.cpp +++ b/lib/Bitcode/Writer/ValueEnumerator.cpp @@ -418,7 +418,7 @@ void ValueEnumerator::EnumerateOperandType(const Value *V) { EnumerateMetadata(V); } -void ValueEnumerator::EnumerateAttributes(const AttrListPtr &PAL) { +void ValueEnumerator::EnumerateAttributes(const AttributeSet &PAL) { if (PAL.isEmpty()) return; // null is always 0. // Do a lookup. unsigned &Entry = AttributeMap[PAL.getRawPointer()]; diff --git a/lib/Bitcode/Writer/ValueEnumerator.h b/lib/Bitcode/Writer/ValueEnumerator.h index 896fc3d0c8..5aeea2001f 100644 --- a/lib/Bitcode/Writer/ValueEnumerator.h +++ b/lib/Bitcode/Writer/ValueEnumerator.h @@ -29,7 +29,7 @@ class Function; class Module; class MDNode; class NamedMDNode; -class AttrListPtr; +class AttributeSet; class ValueSymbolTable; class MDSymbolTable; class raw_ostream; @@ -54,7 +54,7 @@ private: typedef DenseMap AttributeMapType; AttributeMapType AttributeMap; - std::vector Attributes; + std::vector Attributes; /// GlobalBasicBlockIDs - This map memoizes the basic block ID's referenced by /// the "getGlobalBasicBlockID" method. @@ -98,7 +98,7 @@ public: unsigned getInstructionID(const Instruction *I) const; void setInstructionID(const Instruction *I); - unsigned getAttributeID(const AttrListPtr &PAL) const { + unsigned getAttributeID(const AttributeSet &PAL) const { if (PAL.isEmpty()) return 0; // Null maps to zero. AttributeMapType::const_iterator I = AttributeMap.find(PAL.getRawPointer()); assert(I != AttributeMap.end() && "Attribute not in ValueEnumerator!"); @@ -121,7 +121,7 @@ public: const std::vector &getBasicBlocks() const { return BasicBlocks; } - const std::vector &getAttributes() const { + const std::vector &getAttributes() const { return Attributes; } @@ -146,7 +146,7 @@ private: void EnumerateValue(const Value *V); void EnumerateType(Type *T); void EnumerateOperandType(const Value *V); - void EnumerateAttributes(const AttrListPtr &PAL); + void EnumerateAttributes(const AttributeSet &PAL); void EnumerateValueSymbolTable(const ValueSymbolTable &ST); void EnumerateNamedMetadata(const Module *M); diff --git a/lib/Target/CppBackend/CPPBackend.cpp b/lib/Target/CppBackend/CPPBackend.cpp index 218864a091..788c6e6866 100644 --- a/lib/Target/CppBackend/CPPBackend.cpp +++ b/lib/Target/CppBackend/CPPBackend.cpp @@ -141,7 +141,7 @@ namespace { std::string getCppName(const Value* val); inline void printCppName(const Value* val); - void printAttributes(const AttrListPtr &PAL, const std::string &name); + void printAttributes(const AttributeSet &PAL, const std::string &name); void printType(Type* Ty); void printTypes(const Module* M); @@ -464,9 +464,9 @@ void CppWriter::printCppName(const Value* val) { printEscapedString(getCppName(val)); } -void CppWriter::printAttributes(const AttrListPtr &PAL, +void CppWriter::printAttributes(const AttributeSet &PAL, const std::string &name) { - Out << "AttrListPtr " << name << "_PAL;"; + Out << "AttributeSet " << name << "_PAL;"; nl(Out); if (!PAL.isEmpty()) { Out << '{'; in(); nl(Out); @@ -518,7 +518,7 @@ void CppWriter::printAttributes(const AttrListPtr &PAL, Out << "Attrs.push_back(PAWI);"; nl(Out); } - Out << name << "_PAL = AttrListPtr::get(mod->getContext(), Attrs);"; + Out << name << "_PAL = AttributeSet::get(mod->getContext(), Attrs);"; nl(Out); out(); nl(Out); Out << '}'; nl(Out); diff --git a/lib/Target/MBlaze/MBlazeIntrinsicInfo.cpp b/lib/Target/MBlaze/MBlazeIntrinsicInfo.cpp index 356d68b509..5238ad0040 100644 --- a/lib/Target/MBlaze/MBlazeIntrinsicInfo.cpp +++ b/lib/Target/MBlaze/MBlazeIntrinsicInfo.cpp @@ -104,7 +104,7 @@ Function *MBlazeIntrinsicInfo::getDeclaration(Module *M, unsigned IntrID, Type **Tys, unsigned numTy) const { assert(!isOverloaded(IntrID) && "MBlaze intrinsics are not overloaded"); - AttrListPtr AList = getAttributes(M->getContext(), + AttributeSet AList = getAttributes(M->getContext(), (mblazeIntrinsic::ID) IntrID); return cast(M->getOrInsertFunction(getName(IntrID), getType(M->getContext(), IntrID), diff --git a/lib/Target/NVPTX/NVPTXAsmPrinter.cpp b/lib/Target/NVPTX/NVPTXAsmPrinter.cpp index abf3a80fb9..af07576d59 100644 --- a/lib/Target/NVPTX/NVPTXAsmPrinter.cpp +++ b/lib/Target/NVPTX/NVPTXAsmPrinter.cpp @@ -1487,7 +1487,7 @@ void NVPTXAsmPrinter::printParamName(int paramIndex, raw_ostream &O) { void NVPTXAsmPrinter::emitFunctionParamList(const Function *F, raw_ostream &O) { const DataLayout *TD = TM.getDataLayout(); - const AttrListPtr &PAL = F->getAttributes(); + const AttributeSet &PAL = F->getAttributes(); const TargetLowering *TLI = TM.getTargetLowering(); Function::const_arg_iterator I, E; unsigned paramIndex = 0; diff --git a/lib/Target/NVPTX/NVPTXISelLowering.cpp b/lib/Target/NVPTX/NVPTXISelLowering.cpp index 96d8a505aa..4e9d68687a 100644 --- a/lib/Target/NVPTX/NVPTXISelLowering.cpp +++ b/lib/Target/NVPTX/NVPTXISelLowering.cpp @@ -976,7 +976,7 @@ NVPTXTargetLowering::LowerFormalArguments(SDValue Chain, const DataLayout *TD = getDataLayout(); const Function *F = MF.getFunction(); - const AttrListPtr &PAL = F->getAttributes(); + const AttributeSet &PAL = F->getAttributes(); SDValue Root = DAG.getRoot(); std::vector OutChains; diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp index 8f7f38d012..84e5677d6c 100644 --- a/lib/Target/X86/X86ISelLowering.cpp +++ b/lib/Target/X86/X86ISelLowering.cpp @@ -10711,7 +10711,7 @@ SDValue X86TargetLowering::LowerINIT_TRAMPOLINE(SDValue Op, // Check that ECX wasn't needed by an 'inreg' parameter. FunctionType *FTy = Func->getFunctionType(); - const AttrListPtr &Attrs = Func->getAttributes(); + const AttributeSet &Attrs = Func->getAttributes(); if (!Attrs.isEmpty() && !Func->isVarArg()) { unsigned InRegCount = 0; diff --git a/lib/Target/XCore/XCoreFrameLowering.cpp b/lib/Target/XCore/XCoreFrameLowering.cpp index b3d0364857..9257226f80 100644 --- a/lib/Target/XCore/XCoreFrameLowering.cpp +++ b/lib/Target/XCore/XCoreFrameLowering.cpp @@ -98,7 +98,7 @@ void XCoreFrameLowering::emitPrologue(MachineFunction &MF) const { DebugLoc dl = MBBI != MBB.end() ? MBBI->getDebugLoc() : DebugLoc(); bool FP = hasFP(MF); - const AttrListPtr &PAL = MF.getFunction()->getAttributes(); + const AttributeSet &PAL = MF.getFunction()->getAttributes(); for (unsigned I = 0, E = PAL.getNumAttrs(); I != E; ++I) if (PAL.getAttributesAtIndex(I).hasAttribute(Attributes::Nest)) { diff --git a/lib/Transforms/IPO/ArgumentPromotion.cpp b/lib/Transforms/IPO/ArgumentPromotion.cpp index a7b9d782e5..2132e0a5fe 100644 --- a/lib/Transforms/IPO/ArgumentPromotion.cpp +++ b/lib/Transforms/IPO/ArgumentPromotion.cpp @@ -515,12 +515,12 @@ CallGraphNode *ArgPromotion::DoPromotion(Function *F, // that we are *not* promoting. For the ones that we do promote, the parameter // attributes are lost SmallVector AttributesVec; - const AttrListPtr &PAL = F->getAttributes(); + const AttributeSet &PAL = F->getAttributes(); // Add any return attributes. Attributes attrs = PAL.getRetAttributes(); if (attrs.hasAttributes()) - AttributesVec.push_back(AttributeWithIndex::get(AttrListPtr::ReturnIndex, + AttributesVec.push_back(AttributeWithIndex::get(AttributeSet::ReturnIndex, attrs)); // First, determine the new argument list @@ -593,7 +593,7 @@ CallGraphNode *ArgPromotion::DoPromotion(Function *F, // Add any function attributes. attrs = PAL.getFnAttributes(); if (attrs.hasAttributes()) - AttributesVec.push_back(AttributeWithIndex::get(AttrListPtr::FunctionIndex, + AttributesVec.push_back(AttributeWithIndex::get(AttributeSet::FunctionIndex, attrs)); Type *RetTy = FTy->getReturnType(); @@ -611,7 +611,7 @@ CallGraphNode *ArgPromotion::DoPromotion(Function *F, // Recompute the parameter attributes list based on the new arguments for // the function. - NF->setAttributes(AttrListPtr::get(F->getContext(), AttributesVec)); + NF->setAttributes(AttributeSet::get(F->getContext(), AttributesVec)); AttributesVec.clear(); F->getParent()->getFunctionList().insert(F, NF); @@ -636,12 +636,12 @@ CallGraphNode *ArgPromotion::DoPromotion(Function *F, CallSite CS(F->use_back()); assert(CS.getCalledFunction() == F); Instruction *Call = CS.getInstruction(); - const AttrListPtr &CallPAL = CS.getAttributes(); + const AttributeSet &CallPAL = CS.getAttributes(); // Add any return attributes. Attributes attrs = CallPAL.getRetAttributes(); if (attrs.hasAttributes()) - AttributesVec.push_back(AttributeWithIndex::get(AttrListPtr::ReturnIndex, + AttributesVec.push_back(AttributeWithIndex::get(AttributeSet::ReturnIndex, attrs)); // Loop over the operands, inserting GEP and loads in the caller as @@ -723,7 +723,7 @@ CallGraphNode *ArgPromotion::DoPromotion(Function *F, // Add any function attributes. attrs = CallPAL.getFnAttributes(); if (attrs.hasAttributes()) - AttributesVec.push_back(AttributeWithIndex::get(AttrListPtr::FunctionIndex, + AttributesVec.push_back(AttributeWithIndex::get(AttributeSet::FunctionIndex, attrs)); Instruction *New; @@ -731,12 +731,12 @@ CallGraphNode *ArgPromotion::DoPromotion(Function *F, New = InvokeInst::Create(NF, II->getNormalDest(), II->getUnwindDest(), Args, "", Call); cast(New)->setCallingConv(CS.getCallingConv()); - cast(New)->setAttributes(AttrListPtr::get(II->getContext(), + cast(New)->setAttributes(AttributeSet::get(II->getContext(), AttributesVec)); } else { New = CallInst::Create(NF, Args, "", Call); cast(New)->setCallingConv(CS.getCallingConv()); - cast(New)->setAttributes(AttrListPtr::get(New->getContext(), + cast(New)->setAttributes(AttributeSet::get(New->getContext(), AttributesVec)); if (cast(Call)->isTailCall()) cast(New)->setTailCall(); diff --git a/lib/Transforms/IPO/DeadArgumentElimination.cpp b/lib/Transforms/IPO/DeadArgumentElimination.cpp index 3a333acd47..6236a04fc2 100644 --- a/lib/Transforms/IPO/DeadArgumentElimination.cpp +++ b/lib/Transforms/IPO/DeadArgumentElimination.cpp @@ -271,16 +271,16 @@ bool DAE::DeleteDeadVarargs(Function &Fn) { Args.assign(CS.arg_begin(), CS.arg_begin() + NumArgs); // Drop any attributes that were on the vararg arguments. - AttrListPtr PAL = CS.getAttributes(); + AttributeSet PAL = CS.getAttributes(); if (!PAL.isEmpty() && PAL.getSlot(PAL.getNumSlots() - 1).Index > NumArgs) { SmallVector AttributesVec; for (unsigned i = 0; PAL.getSlot(i).Index <= NumArgs; ++i) AttributesVec.push_back(PAL.getSlot(i)); Attributes FnAttrs = PAL.getFnAttributes(); if (FnAttrs.hasAttributes()) - AttributesVec.push_back(AttributeWithIndex::get(AttrListPtr::FunctionIndex, + AttributesVec.push_back(AttributeWithIndex::get(AttributeSet::FunctionIndex, FnAttrs)); - PAL = AttrListPtr::get(Fn.getContext(), AttributesVec); + PAL = AttributeSet::get(Fn.getContext(), AttributesVec); } Instruction *New; @@ -698,7 +698,7 @@ bool DAE::RemoveDeadStuffFromFunction(Function *F) { // Set up to build a new list of parameter attributes. SmallVector AttributesVec; - const AttrListPtr &PAL = F->getAttributes(); + const AttributeSet &PAL = F->getAttributes(); // The existing function return attributes. Attributes RAttrs = PAL.getRetAttributes(); @@ -773,7 +773,7 @@ bool DAE::RemoveDeadStuffFromFunction(Function *F) { "Return attributes no longer compatible?"); if (RAttrs.hasAttributes()) - AttributesVec.push_back(AttributeWithIndex::get(AttrListPtr::ReturnIndex, + AttributesVec.push_back(AttributeWithIndex::get(AttributeSet::ReturnIndex, RAttrs)); // Remember which arguments are still alive. @@ -802,11 +802,11 @@ bool DAE::RemoveDeadStuffFromFunction(Function *F) { } if (FnAttrs.hasAttributes()) - AttributesVec.push_back(AttributeWithIndex::get(AttrListPtr::FunctionIndex, + AttributesVec.push_back(AttributeWithIndex::get(AttributeSet::FunctionIndex, FnAttrs)); // Reconstruct the AttributesList based on the vector we constructed. - AttrListPtr NewPAL = AttrListPtr::get(F->getContext(), AttributesVec); + AttributeSet NewPAL = AttributeSet::get(F->getContext(), AttributesVec); // Create the new function type based on the recomputed parameters. FunctionType *NFTy = FunctionType::get(NRetTy, Params, FTy->isVarArg()); @@ -833,7 +833,7 @@ bool DAE::RemoveDeadStuffFromFunction(Function *F) { Instruction *Call = CS.getInstruction(); AttributesVec.clear(); - const AttrListPtr &CallPAL = CS.getAttributes(); + const AttributeSet &CallPAL = CS.getAttributes(); // The call return attributes. Attributes RAttrs = CallPAL.getRetAttributes(); @@ -843,7 +843,7 @@ bool DAE::RemoveDeadStuffFromFunction(Function *F) { Attributes::get(NF->getContext(), AttrBuilder(RAttrs). removeAttributes(Attributes::typeIncompatible(NF->getReturnType()))); if (RAttrs.hasAttributes()) - AttributesVec.push_back(AttributeWithIndex::get(AttrListPtr::ReturnIndex, + AttributesVec.push_back(AttributeWithIndex::get(AttributeSet::ReturnIndex, RAttrs)); // Declare these outside of the loops, so we can reuse them for the second @@ -870,11 +870,11 @@ bool DAE::RemoveDeadStuffFromFunction(Function *F) { } if (FnAttrs.hasAttributes()) - AttributesVec.push_back(AttributeWithIndex::get(AttrListPtr::FunctionIndex, + AttributesVec.push_back(AttributeWithIndex::get(AttributeSet::FunctionIndex, FnAttrs)); // Reconstruct the AttributesList based on the vector we constructed. - AttrListPtr NewCallPAL = AttrListPtr::get(F->getContext(), AttributesVec); + AttributeSet NewCallPAL = AttributeSet::get(F->getContext(), AttributesVec); Instruction *New; if (InvokeInst *II = dyn_cast(Call)) { diff --git a/lib/Transforms/IPO/FunctionAttrs.cpp b/lib/Transforms/IPO/FunctionAttrs.cpp index 435f376c46..685833da1a 100644 --- a/lib/Transforms/IPO/FunctionAttrs.cpp +++ b/lib/Transforms/IPO/FunctionAttrs.cpp @@ -215,13 +215,13 @@ bool FunctionAttrs::AddReadAttrs(const CallGraphSCC &SCC) { AttrBuilder B; B.addAttribute(Attributes::ReadOnly) .addAttribute(Attributes::ReadNone); - F->removeAttribute(AttrListPtr::FunctionIndex, + F->removeAttribute(AttributeSet::FunctionIndex, Attributes::get(F->getContext(), B)); // Add in the new attribute. B.clear(); B.addAttribute(ReadsMemory ? Attributes::ReadOnly : Attributes::ReadNone); - F->addAttribute(AttrListPtr::FunctionIndex, + F->addAttribute(AttributeSet::FunctionIndex, Attributes::get(F->getContext(), B)); if (ReadsMemory) diff --git a/lib/Transforms/IPO/GlobalOpt.cpp b/lib/Transforms/IPO/GlobalOpt.cpp index 68c7b7dd78..20f9de5a83 100644 --- a/lib/Transforms/IPO/GlobalOpt.cpp +++ b/lib/Transforms/IPO/GlobalOpt.cpp @@ -2065,7 +2065,7 @@ static void ChangeCalleesToFastCall(Function *F) { } } -static AttrListPtr StripNest(LLVMContext &C, const AttrListPtr &Attrs) { +static AttributeSet StripNest(LLVMContext &C, const AttributeSet &Attrs) { for (unsigned i = 0, e = Attrs.getNumSlots(); i != e; ++i) { if (!Attrs.getSlot(i).Attrs.hasAttribute(Attributes::Nest)) continue; diff --git a/lib/Transforms/IPO/PruneEH.cpp b/lib/Transforms/IPO/PruneEH.cpp index a9f8acfd13..19f34837c7 100644 --- a/lib/Transforms/IPO/PruneEH.cpp +++ b/lib/Transforms/IPO/PruneEH.cpp @@ -145,8 +145,8 @@ bool PruneEH::runOnSCC(CallGraphSCC &SCC) { NewAttributes.addAttribute(Attributes::NoReturn); Function *F = (*I)->getFunction(); - const AttrListPtr &PAL = F->getAttributes(); - const AttrListPtr &NPAL = PAL.addAttr(F->getContext(), ~0, + const AttributeSet &PAL = F->getAttributes(); + const AttributeSet &NPAL = PAL.addAttr(F->getContext(), ~0, Attributes::get(F->getContext(), NewAttributes)); if (PAL != NPAL) { diff --git a/lib/Transforms/InstCombine/InstCombineCalls.cpp b/lib/Transforms/InstCombine/InstCombineCalls.cpp index 2d8904d77e..784742f274 100644 --- a/lib/Transforms/InstCombine/InstCombineCalls.cpp +++ b/lib/Transforms/InstCombine/InstCombineCalls.cpp @@ -982,7 +982,7 @@ bool InstCombiner::transformConstExprCastCall(CallSite CS) { if (Callee == 0) return false; Instruction *Caller = CS.getInstruction(); - const AttrListPtr &CallerPAL = CS.getAttributes(); + const AttributeSet &CallerPAL = CS.getAttributes(); // Okay, this is a cast from a function to a different type. Unless doing so // would cause a type conversion of one of our arguments, change this call to @@ -1123,7 +1123,7 @@ bool InstCombiner::transformConstExprCastCall(CallSite CS) { // Add the new return attributes. if (RAttrs.hasAttributes()) attrVec.push_back( - AttributeWithIndex::get(AttrListPtr::ReturnIndex, + AttributeWithIndex::get(AttributeSet::ReturnIndex, Attributes::get(FT->getContext(), RAttrs))); AI = CS.arg_begin(); @@ -1176,13 +1176,13 @@ bool InstCombiner::transformConstExprCastCall(CallSite CS) { Attributes FnAttrs = CallerPAL.getFnAttributes(); if (FnAttrs.hasAttributes()) - attrVec.push_back(AttributeWithIndex::get(AttrListPtr::FunctionIndex, + attrVec.push_back(AttributeWithIndex::get(AttributeSet::FunctionIndex, FnAttrs)); if (NewRetTy->isVoidTy()) Caller->setName(""); // Void type should not have a name. - const AttrListPtr &NewCallerPAL = AttrListPtr::get(Callee->getContext(), + const AttributeSet &NewCallerPAL = AttributeSet::get(Callee->getContext(), attrVec); Instruction *NC; @@ -1243,7 +1243,7 @@ InstCombiner::transformCallThroughTrampoline(CallSite CS, Value *Callee = CS.getCalledValue(); PointerType *PTy = cast(Callee->getType()); FunctionType *FTy = cast(PTy->getElementType()); - const AttrListPtr &Attrs = CS.getAttributes(); + const AttributeSet &Attrs = CS.getAttributes(); // If the call already has the 'nest' attribute somewhere then give up - // otherwise 'nest' would occur twice after splicing in the chain. @@ -1258,7 +1258,7 @@ InstCombiner::transformCallThroughTrampoline(CallSite CS, PointerType *NestFPTy = cast(NestF->getType()); FunctionType *NestFTy = cast(NestFPTy->getElementType()); - const AttrListPtr &NestAttrs = NestF->getAttributes(); + const AttributeSet &NestAttrs = NestF->getAttributes(); if (!NestAttrs.isEmpty()) { unsigned NestIdx = 1; Type *NestTy = 0; @@ -1288,7 +1288,7 @@ InstCombiner::transformCallThroughTrampoline(CallSite CS, // Add any result attributes. Attributes Attr = Attrs.getRetAttributes(); if (Attr.hasAttributes()) - NewAttrs.push_back(AttributeWithIndex::get(AttrListPtr::ReturnIndex, + NewAttrs.push_back(AttributeWithIndex::get(AttributeSet::ReturnIndex, Attr)); { @@ -1321,7 +1321,7 @@ InstCombiner::transformCallThroughTrampoline(CallSite CS, // Add any function attributes. Attr = Attrs.getFnAttributes(); if (Attr.hasAttributes()) - NewAttrs.push_back(AttributeWithIndex::get(AttrListPtr::FunctionIndex, + NewAttrs.push_back(AttributeWithIndex::get(AttributeSet::FunctionIndex, Attr)); // The trampoline may have been bitcast to a bogus type (FTy). @@ -1361,7 +1361,7 @@ InstCombiner::transformCallThroughTrampoline(CallSite CS, NestF->getType() == PointerType::getUnqual(NewFTy) ? NestF : ConstantExpr::getBitCast(NestF, PointerType::getUnqual(NewFTy)); - const AttrListPtr &NewPAL = AttrListPtr::get(FTy->getContext(), NewAttrs); + const AttributeSet &NewPAL = AttributeSet::get(FTy->getContext(), NewAttrs); Instruction *NewCaller; if (InvokeInst *II = dyn_cast(Caller)) { diff --git a/lib/Transforms/Instrumentation/MemorySanitizer.cpp b/lib/Transforms/Instrumentation/MemorySanitizer.cpp index 65c894bee2..947a2e3b12 100644 --- a/lib/Transforms/Instrumentation/MemorySanitizer.cpp +++ b/lib/Transforms/Instrumentation/MemorySanitizer.cpp @@ -1192,7 +1192,7 @@ struct MemorySanitizerVisitor : public InstVisitor { AttrBuilder B; B.addAttribute(Attributes::ReadOnly) .addAttribute(Attributes::ReadNone); - Func->removeAttribute(AttrListPtr::FunctionIndex, + Func->removeAttribute(AttributeSet::FunctionIndex, Attributes::get(Func->getContext(), B)); } } @@ -1572,7 +1572,7 @@ bool MemorySanitizer::runOnFunction(Function &F) { AttrBuilder B; B.addAttribute(Attributes::ReadOnly) .addAttribute(Attributes::ReadNone); - F.removeAttribute(AttrListPtr::FunctionIndex, + F.removeAttribute(AttributeSet::FunctionIndex, Attributes::get(F.getContext(), B)); return Visitor.runOnFunction(); diff --git a/lib/Transforms/Scalar/ObjCARC.cpp b/lib/Transforms/Scalar/ObjCARC.cpp index 3e88d1b47d..ce397658bf 100644 --- a/lib/Transforms/Scalar/ObjCARC.cpp +++ b/lib/Transforms/Scalar/ObjCARC.cpp @@ -1788,8 +1788,8 @@ Constant *ObjCARCOpt::getRetainRVCallee(Module *M) { Type *I8X = PointerType::getUnqual(Type::getInt8Ty(C)); Type *Params[] = { I8X }; FunctionType *FTy = FunctionType::get(I8X, Params, /*isVarArg=*/false); - AttrListPtr Attributes = - AttrListPtr().addAttr(M->getContext(), AttrListPtr::FunctionIndex, + AttributeSet Attributes = + AttributeSet().addAttr(M->getContext(), AttributeSet::FunctionIndex, Attributes::get(C, Attributes::NoUnwind)); RetainRVCallee = M->getOrInsertFunction("objc_retainAutoreleasedReturnValue", FTy, @@ -1804,8 +1804,8 @@ Constant *ObjCARCOpt::getAutoreleaseRVCallee(Module *M) { Type *I8X = PointerType::getUnqual(Type::getInt8Ty(C)); Type *Params[] = { I8X }; FunctionType *FTy = FunctionType::get(I8X, Params, /*isVarArg=*/false); - AttrListPtr Attributes = - AttrListPtr().addAttr(M->getContext(), AttrListPtr::FunctionIndex, + AttributeSet Attributes = + AttributeSet().addAttr(M->getContext(), AttributeSet::FunctionIndex, Attributes::get(C, Attributes::NoUnwind)); AutoreleaseRVCallee = M->getOrInsertFunction("objc_autoreleaseReturnValue", FTy, @@ -1818,8 +1818,8 @@ Constant *ObjCARCOpt::getReleaseCallee(Module *M) { if (!ReleaseCallee) { LLVMContext &C = M->getContext(); Type *Params[] = { PointerType::getUnqual(Type::getInt8Ty(C)) }; - AttrListPtr Attributes = - AttrListPtr().addAttr(M->getContext(), AttrListPtr::FunctionIndex, + AttributeSet Attributes = + AttributeSet().addAttr(M->getContext(), AttributeSet::FunctionIndex, Attributes::get(C, Attributes::NoUnwind)); ReleaseCallee = M->getOrInsertFunction( @@ -1834,8 +1834,8 @@ Constant *ObjCARCOpt::getRetainCallee(Module *M) { if (!RetainCallee) { LLVMContext &C = M->getContext(); Type *Params[] = { PointerType::getUnqual(Type::getInt8Ty(C)) }; - AttrListPtr Attributes = - AttrListPtr().addAttr(M->getContext(), AttrListPtr::FunctionIndex, + AttributeSet Attributes = + AttributeSet().addAttr(M->getContext(), AttributeSet::FunctionIndex, Attributes::get(C, Attributes::NoUnwind)); RetainCallee = M->getOrInsertFunction( @@ -1856,7 +1856,7 @@ Constant *ObjCARCOpt::getRetainBlockCallee(Module *M) { M->getOrInsertFunction( "objc_retainBlock", FunctionType::get(Params[0], Params, /*isVarArg=*/false), - AttrListPtr()); + AttributeSet()); } return RetainBlockCallee; } @@ -1865,8 +1865,8 @@ Constant *ObjCARCOpt::getAutoreleaseCallee(Module *M) { if (!AutoreleaseCallee) { LLVMContext &C = M->getContext(); Type *Params[] = { PointerType::getUnqual(Type::getInt8Ty(C)) }; - AttrListPtr Attributes = - AttrListPtr().addAttr(M->getContext(), AttrListPtr::FunctionIndex, + AttributeSet Attributes = + AttributeSet().addAttr(M->getContext(), AttributeSet::FunctionIndex, Attributes::get(C, Attributes::NoUnwind)); AutoreleaseCallee = M->getOrInsertFunction( @@ -3840,8 +3840,8 @@ Constant *ObjCARCContract::getStoreStrongCallee(Module *M) { Type *I8XX = PointerType::getUnqual(I8X); Type *Params[] = { I8XX, I8X }; - AttrListPtr Attributes = AttrListPtr() - .addAttr(M->getContext(), AttrListPtr::FunctionIndex, + AttributeSet Attributes = AttributeSet() + .addAttr(M->getContext(), AttributeSet::FunctionIndex, Attributes::get(C, Attributes::NoUnwind)) .addAttr(M->getContext(), 1, Attributes::get(C, Attributes::NoCapture)); @@ -3860,8 +3860,8 @@ Constant *ObjCARCContract::getRetainAutoreleaseCallee(Module *M) { Type *I8X = PointerType::getUnqual(Type::getInt8Ty(C)); Type *Params[] = { I8X }; FunctionType *FTy = FunctionType::get(I8X, Params, /*isVarArg=*/false); - AttrListPtr Attributes = - AttrListPtr().addAttr(M->getContext(), AttrListPtr::FunctionIndex, + AttributeSet Attributes = + AttributeSet().addAttr(M->getContext(), AttributeSet::FunctionIndex, Attributes::get(C, Attributes::NoUnwind)); RetainAutoreleaseCallee = M->getOrInsertFunction("objc_retainAutorelease", FTy, Attributes); @@ -3875,8 +3875,8 @@ Constant *ObjCARCContract::getRetainAutoreleaseRVCallee(Module *M) { Type *I8X = PointerType::getUnqual(Type::getInt8Ty(C)); Type *Params[] = { I8X }; FunctionType *FTy = FunctionType::get(I8X, Params, /*isVarArg=*/false); - AttrListPtr Attributes = - AttrListPtr().addAttr(M->getContext(), AttrListPtr::FunctionIndex, + AttributeSet Attributes = + AttributeSet().addAttr(M->getContext(), AttributeSet::FunctionIndex, Attributes::get(C, Attributes::NoUnwind)); RetainAutoreleaseRVCallee = M->getOrInsertFunction("objc_retainAutoreleaseReturnValue", FTy, diff --git a/lib/Transforms/Utils/BuildLibCalls.cpp b/lib/Transforms/Utils/BuildLibCalls.cpp index 58bdf789be..62b79bf2b3 100644 --- a/lib/Transforms/Utils/BuildLibCalls.cpp +++ b/lib/Transforms/Utils/BuildLibCalls.cpp @@ -43,12 +43,12 @@ Value *llvm::EmitStrLen(Value *Ptr, IRBuilder<> &B, const DataLayout *TD, AttributeWithIndex AWI[2]; AWI[0] = AttributeWithIndex::get(M->getContext(), 1, Attributes::NoCapture); Attributes::AttrVal AVs[2] = { Attributes::ReadOnly, Attributes::NoUnwind }; - AWI[1] = AttributeWithIndex::get(M->getContext(), AttrListPtr::FunctionIndex, + AWI[1] = AttributeWithIndex::get(M->getContext(), AttributeSet::FunctionIndex, ArrayRef(AVs, 2)); LLVMContext &Context = B.GetInsertBlock()->getContext(); Constant *StrLen = M->getOrInsertFunction("strlen", - AttrListPtr::get(M->getContext(), + AttributeSet::get(M->getContext(), AWI), TD->getIntPtrType(Context), B.getInt8PtrTy(), @@ -72,12 +72,12 @@ Value *llvm::EmitStrNLen(Value *Ptr, Value *MaxLen, IRBuilder<> &B, AttributeWithIndex AWI[2]; AWI[0] = AttributeWithIndex::get(M->getContext(), 1, Attributes::NoCapture); Attributes::AttrVal AVs[2] = { Attributes::ReadOnly, Attributes::NoUnwind }; - AWI[1] = AttributeWithIndex::get(M->getContext(), AttrListPtr::FunctionIndex, + AWI[1] = AttributeWithIndex::get(M->getContext(), AttributeSet::FunctionIndex, ArrayRef(AVs, 2)); LLVMContext &Context = B.GetInsertBlock()->getContext(); Constant *StrNLen = M->getOrInsertFunction("strnlen", - AttrListPtr::get(M->getContext(), + AttributeSet::get(M->getContext(), AWI), TD->getIntPtrType(Context), B.getInt8PtrTy(), @@ -101,13 +101,13 @@ Value *llvm::EmitStrChr(Value *Ptr, char C, IRBuilder<> &B, Module *M = B.GetInsertBlock()->getParent()->getParent(); Attributes::AttrVal AVs[2] = { Attributes::ReadOnly, Attributes::NoUnwind }; AttributeWithIndex AWI = - AttributeWithIndex::get(M->getContext(), AttrListPtr::FunctionIndex, + AttributeWithIndex::get(M->getContext(), AttributeSet::FunctionIndex, ArrayRef(AVs, 2)); Type *I8Ptr = B.getInt8PtrTy(); Type *I32Ty = B.getInt32Ty(); Constant *StrChr = M->getOrInsertFunction("strchr", - AttrListPtr::get(M->getContext(), + AttributeSet::get(M->getContext(), AWI), I8Ptr, I8Ptr, I32Ty, NULL); CallInst *CI = B.CreateCall2(StrChr, CastToCStr(Ptr, B), @@ -129,12 +129,12 @@ Value *llvm::EmitStrNCmp(Value *Ptr1, Value *Ptr2, Value *Len, AWI[0] = AttributeWithIndex::get(M->getContext(), 1, Attributes::NoCapture); AWI[1] = AttributeWithIndex::get(M->getContext(), 2, Attributes::NoCapture); Attributes::AttrVal AVs[2] = { Attributes::ReadOnly, Attributes::NoUnwind }; - AWI[2] = AttributeWithIndex::get(M->getContext(), AttrListPtr::FunctionIndex, + AWI[2] = AttributeWithIndex::get(M->getContext(), AttributeSet::FunctionIndex, ArrayRef(AVs, 2)); LLVMContext &Context = B.GetInsertBlock()->getContext(); Value *StrNCmp = M->getOrInsertFunction("strncmp", - AttrListPtr::get(M->getContext(), + AttributeSet::get(M->getContext(), AWI), B.getInt32Ty(), B.getInt8PtrTy(), @@ -160,11 +160,11 @@ Value *llvm::EmitStrCpy(Value *Dst, Value *Src, IRBuilder<> &B, Module *M = B.GetInsertBlock()->getParent()->getParent(); AttributeWithIndex AWI[2]; AWI[0] = AttributeWithIndex::get(M->getContext(), 2, Attributes::NoCapture); - AWI[1] = AttributeWithIndex::get(M->getContext(), AttrListPtr::FunctionIndex, + AWI[1] = AttributeWithIndex::get(M->getContext(), AttributeSet::FunctionIndex, Attributes::NoUnwind); Type *I8Ptr = B.getInt8PtrTy(); Value *StrCpy = M->getOrInsertFunction(Name, - AttrListPtr::get(M->getContext(), AWI), + AttributeSet::get(M->getContext(), AWI), I8Ptr, I8Ptr, I8Ptr, NULL); CallInst *CI = B.CreateCall2(StrCpy, CastToCStr(Dst, B), CastToCStr(Src, B), Name); @@ -184,11 +184,11 @@ Value *llvm::EmitStrNCpy(Value *Dst, Value *Src, Value *Len, Module *M = B.GetInsertBlock()->getParent()->getParent(); AttributeWithIndex AWI[2]; AWI[0] = AttributeWithIndex::get(M->getContext(), 2, Attributes::NoCapture); - AWI[1] = AttributeWithIndex::get(M->getContext(), AttrListPtr::FunctionIndex, + AWI[1] = AttributeWithIndex::get(M->getContext(), AttributeSet::FunctionIndex, Attributes::NoUnwind); Type *I8Ptr = B.getInt8PtrTy(); Value *StrNCpy = M->getOrInsertFunction(Name, - AttrListPtr::get(M->getContext(), + AttributeSet::get(M->getContext(), AWI), I8Ptr, I8Ptr, I8Ptr, Len->getType(), NULL); @@ -210,11 +210,11 @@ Value *llvm::EmitMemCpyChk(Value *Dst, Value *Src, Value *Len, Value *ObjSize, Module *M = B.GetInsertBlock()->getParent()->getParent(); AttributeWithIndex AWI; - AWI = AttributeWithIndex::get(M->getContext(), AttrListPtr::FunctionIndex, + AWI = AttributeWithIndex::get(M->getContext(), AttributeSet::FunctionIndex, Attributes::NoUnwind); LLVMContext &Context = B.GetInsertBlock()->getContext(); Value *MemCpy = M->getOrInsertFunction("__memcpy_chk", - AttrListPtr::get(M->getContext(), AWI), + AttributeSet::get(M->getContext(), AWI), B.getInt8PtrTy(), B.getInt8PtrTy(), B.getInt8PtrTy(), @@ -239,11 +239,11 @@ Value *llvm::EmitMemChr(Value *Ptr, Value *Val, Module *M = B.GetInsertBlock()->getParent()->getParent(); AttributeWithIndex AWI; Attributes::AttrVal AVs[2] = { Attributes::ReadOnly, Attributes::NoUnwind }; - AWI = AttributeWithIndex::get(M->getContext(), AttrListPtr::FunctionIndex, + AWI = AttributeWithIndex::get(M->getContext(), AttributeSet::FunctionIndex, ArrayRef(AVs, 2)); LLVMContext &Context = B.GetInsertBlock()->getContext(); Value *MemChr = M->getOrInsertFunction("memchr", - AttrListPtr::get(M->getContext(), AWI), + AttributeSet::get(M->getContext(), AWI), B.getInt8PtrTy(), B.getInt8PtrTy(), B.getInt32Ty(), @@ -269,12 +269,12 @@ Value *llvm::EmitMemCmp(Value *Ptr1, Value *Ptr2, AWI[0] = AttributeWithIndex::get(M->getContext(), 1, Attributes::NoCapture); AWI[1] = AttributeWithIndex::get(M->getContext(), 2, Attributes::NoCapture); Attributes::AttrVal AVs[2] = { Attributes::ReadOnly, Attributes::NoUnwind }; - AWI[2] = AttributeWithIndex::get(M->getContext(), AttrListPtr::FunctionIndex, + AWI[2] = AttributeWithIndex::get(M->getContext(), AttributeSet::FunctionIndex, ArrayRef(AVs, 2)); LLVMContext &Context = B.GetInsertBlock()->getContext(); Value *MemCmp = M->getOrInsertFunction("memcmp", - AttrListPtr::get(M->getContext(), AWI), + AttributeSet::get(M->getContext(), AWI), B.getInt32Ty(), B.getInt8PtrTy(), B.getInt8PtrTy(), @@ -293,7 +293,7 @@ Value *llvm::EmitMemCmp(Value *Ptr1, Value *Ptr2, /// returns one value with the same type. If 'Op' is a long double, 'l' is /// added as the suffix of name, if 'Op' is a float, we add a 'f' suffix. Value *llvm::EmitUnaryFloatFnCall(Value *Op, StringRef Name, IRBuilder<> &B, - const AttrListPtr &Attrs) { + const AttributeSet &Attrs) { SmallString<20> NameBuffer; if (!Op->getType()->isDoubleTy()) { // If we need to add a suffix, copy into NameBuffer. @@ -348,11 +348,11 @@ Value *llvm::EmitPutS(Value *Str, IRBuilder<> &B, const DataLayout *TD, Module *M = B.GetInsertBlock()->getParent()->getParent(); AttributeWithIndex AWI[2]; AWI[0] = AttributeWithIndex::get(M->getContext(), 1, Attributes::NoCapture); - AWI[1] = AttributeWithIndex::get(M->getContext(), AttrListPtr::FunctionIndex, + AWI[1] = AttributeWithIndex::get(M->getContext(), AttributeSet::FunctionIndex, Attributes::NoUnwind); Value *PutS = M->getOrInsertFunction("puts", - AttrListPtr::get(M->getContext(), AWI), + AttributeSet::get(M->getContext(), AWI), B.getInt32Ty(), B.getInt8PtrTy(), NULL); @@ -372,12 +372,12 @@ Value *llvm::EmitFPutC(Value *Char, Value *File, IRBuilder<> &B, Module *M = B.GetInsertBlock()->getParent()->getParent(); AttributeWithIndex AWI[2]; AWI[0] = AttributeWithIndex::get(M->getContext(), 2, Attributes::NoCapture); - AWI[1] = AttributeWithIndex::get(M->getContext(), AttrListPtr::FunctionIndex, + AWI[1] = AttributeWithIndex::get(M->getContext(), AttributeSet::FunctionIndex, Attributes::NoUnwind); Constant *F; if (File->getType()->isPointerTy()) F = M->getOrInsertFunction("fputc", - AttrListPtr::get(M->getContext(), AWI), + AttributeSet::get(M->getContext(), AWI), B.getInt32Ty(), B.getInt32Ty(), File->getType(), NULL); @@ -406,13 +406,13 @@ Value *llvm::EmitFPutS(Value *Str, Value *File, IRBuilder<> &B, AttributeWithIndex AWI[3]; AWI[0] = AttributeWithIndex::get(M->getContext(), 1, Attributes::NoCapture); AWI[1] = AttributeWithIndex::get(M->getContext(), 2, Attributes::NoCapture); - AWI[2] = AttributeWithIndex::get(M->getContext(), AttrListPtr::FunctionIndex, + AWI[2] = AttributeWithIndex::get(M->getContext(), AttributeSet::FunctionIndex, Attributes::NoUnwind); StringRef FPutsName = TLI->getName(LibFunc::fputs); Constant *F; if (File->getType()->isPointerTy()) F = M->getOrInsertFunction(FPutsName, - AttrListPtr::get(M->getContext(), AWI), + AttributeSet::get(M->getContext(), AWI), B.getInt32Ty(), B.getInt8PtrTy(), File->getType(), NULL); @@ -439,14 +439,14 @@ Value *llvm::EmitFWrite(Value *Ptr, Value *Size, Value *File, AttributeWithIndex AWI[3]; AWI[0] = AttributeWithIndex::get(M->getContext(), 1, Attributes::NoCapture); AWI[1] = AttributeWithIndex::get(M->getContext(), 4, Attributes::NoCapture); - AWI[2] = AttributeWithIndex::get(M->getContext(), AttrListPtr::FunctionIndex, + AWI[2] = AttributeWithIndex::get(M->getContext(), AttributeSet::FunctionIndex, Attributes::NoUnwind); LLVMContext &Context = B.GetInsertBlock()->getContext(); StringRef FWriteName = TLI->getName(LibFunc::fwrite); Constant *F; if (File->getType()->isPointerTy()) F = M->getOrInsertFunction(FWriteName, - AttrListPtr::get(M->getContext(), AWI), + AttributeSet::get(M->getContext(), AWI), TD->getIntPtrType(Context), B.getInt8PtrTy(), TD->getIntPtrType(Context), diff --git a/lib/Transforms/Utils/CloneFunction.cpp b/lib/Transforms/Utils/CloneFunction.cpp index 7ecb103090..12f2e4b83e 100644 --- a/lib/Transforms/Utils/CloneFunction.cpp +++ b/lib/Transforms/Utils/CloneFunction.cpp @@ -99,12 +99,12 @@ void llvm::CloneFunctionInto(Function *NewFunc, const Function *OldFunc, .getParamAttributes(I->getArgNo() + 1)); NewFunc->setAttributes(NewFunc->getAttributes() .addAttr(NewFunc->getContext(), - AttrListPtr::ReturnIndex, + AttributeSet::ReturnIndex, OldFunc->getAttributes() .getRetAttributes())); NewFunc->setAttributes(NewFunc->getAttributes() .addAttr(NewFunc->getContext(), - AttrListPtr::FunctionIndex, + AttributeSet::FunctionIndex, OldFunc->getAttributes() .getFnAttributes())); diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp index ffbdd2ebdb..4ad08ff8a2 100644 --- a/lib/VMCore/AsmWriter.cpp +++ b/lib/VMCore/AsmWriter.cpp @@ -1556,7 +1556,7 @@ void AssemblyWriter::printFunction(const Function *F) { } FunctionType *FT = F->getFunctionType(); - const AttrListPtr &Attrs = F->getAttributes(); + const AttributeSet &Attrs = F->getAttributes(); Attributes RetAttrs = Attrs.getRetAttributes(); if (RetAttrs.hasAttributes()) Out << Attrs.getRetAttributes().getAsString() << ' '; @@ -1849,7 +1849,7 @@ void AssemblyWriter::printInstruction(const Instruction &I) { PointerType *PTy = cast(Operand->getType()); FunctionType *FTy = cast(PTy->getElementType()); Type *RetTy = FTy->getReturnType(); - const AttrListPtr &PAL = CI->getAttributes(); + const AttributeSet &PAL = CI->getAttributes(); if (PAL.getRetAttributes().hasAttributes()) Out << ' ' << PAL.getRetAttributes().getAsString(); @@ -1882,7 +1882,7 @@ void AssemblyWriter::printInstruction(const Instruction &I) { PointerType *PTy = cast(Operand->getType()); FunctionType *FTy = cast(PTy->getElementType()); Type *RetTy = FTy->getReturnType(); - const AttrListPtr &PAL = II->getAttributes(); + const AttributeSet &PAL = II->getAttributes(); // Print the calling convention being used. if (II->getCallingConv() != CallingConv::C) { diff --git a/lib/VMCore/Attributes.cpp b/lib/VMCore/Attributes.cpp index 108e222eaa..751ff85f21 100644 --- a/lib/VMCore/Attributes.cpp +++ b/lib/VMCore/Attributes.cpp @@ -8,7 +8,7 @@ //===----------------------------------------------------------------------===// // // This file implements the Attributes, AttributeImpl, AttrBuilder, -// AttributeListImpl, and AttrListPtr classes. +// AttributeListImpl, and AttributeSet classes. // //===----------------------------------------------------------------------===// @@ -355,11 +355,11 @@ uint64_t AttributesImpl::getStackAlignment() const { // AttributeListImpl Definition //===----------------------------------------------------------------------===// -AttrListPtr AttrListPtr::get(LLVMContext &C, +AttributeSet AttributeSet::get(LLVMContext &C, ArrayRef Attrs) { // If there are no attributes then return a null AttributesList pointer. if (Attrs.empty()) - return AttrListPtr(); + return AttributeSet(); #ifndef NDEBUG for (unsigned i = 0, e = Attrs.size(); i != e; ++i) { @@ -387,14 +387,14 @@ AttrListPtr AttrListPtr::get(LLVMContext &C, } // Return the AttributesList that we found or created. - return AttrListPtr(PA); + return AttributeSet(PA); } //===----------------------------------------------------------------------===// -// AttrListPtr Method Implementations +// AttributeSet Method Implementations //===----------------------------------------------------------------------===// -const AttrListPtr &AttrListPtr::operator=(const AttrListPtr &RHS) { +const AttributeSet &AttributeSet::operator=(const AttributeSet &RHS) { if (AttrList == RHS.AttrList) return *this; AttrList = RHS.AttrList; @@ -404,13 +404,13 @@ const AttrListPtr &AttrListPtr::operator=(const AttrListPtr &RHS) { /// getNumSlots - Return the number of slots used in this attribute list. /// This is the number of arguments that have an attribute set on them /// (including the function itself). -unsigned AttrListPtr::getNumSlots() const { +unsigned AttributeSet::getNumSlots() const { return AttrList ? AttrList->Attrs.size() : 0; } /// getSlot - Return the AttributeWithIndex at the specified slot. This /// holds a number plus a set of attributes. -const AttributeWithIndex &AttrListPtr::getSlot(unsigned Slot) const { +const AttributeWithIndex &AttributeSet::getSlot(unsigned Slot) const { assert(AttrList && Slot < AttrList->Attrs.size() && "Slot # out of range!"); return AttrList->Attrs[Slot]; } @@ -418,7 +418,7 @@ const AttributeWithIndex &AttrListPtr::getSlot(unsigned Slot) const { /// getAttributes - The attributes for the specified index are returned. /// Attributes for the result are denoted with Idx = 0. Function notes are /// denoted with idx = ~0. -Attributes AttrListPtr::getAttributes(unsigned Idx) const { +Attributes AttributeSet::getAttributes(unsigned Idx) const { if (AttrList == 0) return Attributes(); const SmallVector &Attrs = AttrList->Attrs; @@ -431,7 +431,7 @@ Attributes AttrListPtr::getAttributes(unsigned Idx) const { /// hasAttrSomewhere - Return true if the specified attribute is set for at /// least one parameter or for the return value. -bool AttrListPtr::hasAttrSomewhere(Attributes::AttrVal Attr) const { +bool AttributeSet::hasAttrSomewhere(Attributes::AttrVal Attr) const { if (AttrList == 0) return false; const SmallVector &Attrs = AttrList->Attrs; @@ -442,17 +442,17 @@ bool AttrListPtr::hasAttrSomewhere(Attributes::AttrVal Attr) const { return false; } -unsigned AttrListPtr::getNumAttrs() const { +unsigned AttributeSet::getNumAttrs() const { return AttrList ? AttrList->Attrs.size() : 0; } -Attributes &AttrListPtr::getAttributesAtIndex(unsigned i) const { +Attributes &AttributeSet::getAttributesAtIndex(unsigned i) const { assert(AttrList && "Trying to get an attribute from an empty list!"); assert(i < AttrList->Attrs.size() && "Index out of range!"); return AttrList->Attrs[i].Attrs; } -AttrListPtr AttrListPtr::addAttr(LLVMContext &C, unsigned Idx, +AttributeSet AttributeSet::addAttr(LLVMContext &C, unsigned Idx, Attributes Attrs) const { Attributes OldAttrs = getAttributes(Idx); #ifndef NDEBUG @@ -497,7 +497,7 @@ AttrListPtr AttrListPtr::addAttr(LLVMContext &C, unsigned Idx, return get(C, NewAttrList); } -AttrListPtr AttrListPtr::removeAttr(LLVMContext &C, unsigned Idx, +AttributeSet AttributeSet::removeAttr(LLVMContext &C, unsigned Idx, Attributes Attrs) const { #ifndef NDEBUG // FIXME it is not obvious how this should work for alignment. @@ -505,7 +505,7 @@ AttrListPtr AttrListPtr::removeAttr(LLVMContext &C, unsigned Idx, assert(!Attrs.hasAttribute(Attributes::Alignment) && "Attempt to exclude alignment!"); #endif - if (AttrList == 0) return AttrListPtr(); + if (AttrList == 0) return AttributeSet(); Attributes OldAttrs = getAttributes(Idx); AttrBuilder NewAttrs = @@ -536,7 +536,7 @@ AttrListPtr AttrListPtr::removeAttr(LLVMContext &C, unsigned Idx, return get(C, NewAttrList); } -void AttrListPtr::dump() const { +void AttributeSet::dump() const { dbgs() << "PAL[ "; for (unsigned i = 0; i < getNumSlots(); ++i) { const AttributeWithIndex &PAWI = getSlot(i); diff --git a/lib/VMCore/Core.cpp b/lib/VMCore/Core.cpp index a15b987f09..0fb37cb0b4 100644 --- a/lib/VMCore/Core.cpp +++ b/lib/VMCore/Core.cpp @@ -1380,27 +1380,27 @@ void LLVMSetGC(LLVMValueRef Fn, const char *GC) { void LLVMAddFunctionAttr(LLVMValueRef Fn, LLVMAttribute PA) { Function *Func = unwrap(Fn); - const AttrListPtr PAL = Func->getAttributes(); + const AttributeSet PAL = Func->getAttributes(); AttrBuilder B(PA); - const AttrListPtr PALnew = - PAL.addAttr(Func->getContext(), AttrListPtr::FunctionIndex, + const AttributeSet PALnew = + PAL.addAttr(Func->getContext(), AttributeSet::FunctionIndex, Attributes::get(Func->getContext(), B)); Func->setAttributes(PALnew); } void LLVMRemoveFunctionAttr(LLVMValueRef Fn, LLVMAttribute PA) { Function *Func = unwrap(Fn); - const AttrListPtr PAL = Func->getAttributes(); + const AttributeSet PAL = Func->getAttributes(); AttrBuilder B(PA); - const AttrListPtr PALnew = - PAL.removeAttr(Func->getContext(), AttrListPtr::FunctionIndex, + const AttributeSet PALnew = + PAL.removeAttr(Func->getContext(), AttributeSet::FunctionIndex, Attributes::get(Func->getContext(), B)); Func->setAttributes(PALnew); } LLVMAttribute LLVMGetFunctionAttr(LLVMValueRef Fn) { Function *Func = unwrap(Fn); - const AttrListPtr PAL = Func->getAttributes(); + const AttributeSet PAL = Func->getAttributes(); Attributes attr = PAL.getFnAttributes(); return (LLVMAttribute)attr.Raw(); } diff --git a/lib/VMCore/Function.cpp b/lib/VMCore/Function.cpp index 860787e1b8..9b2046bb12 100644 --- a/lib/VMCore/Function.cpp +++ b/lib/VMCore/Function.cpp @@ -249,13 +249,13 @@ void Function::dropAllReferences() { } void Function::addAttribute(unsigned i, Attributes attr) { - AttrListPtr PAL = getAttributes(); + AttributeSet PAL = getAttributes(); PAL = PAL.addAttr(getContext(), i, attr); setAttributes(PAL); } void Function::removeAttribute(unsigned i, Attributes attr) { - AttrListPtr PAL = getAttributes(); + AttributeSet PAL = getAttributes(); PAL = PAL.removeAttr(getContext(), i, attr); setAttributes(PAL); } diff --git a/lib/VMCore/Instructions.cpp b/lib/VMCore/Instructions.cpp index 25c8e7684e..ded95349d4 100644 --- a/lib/VMCore/Instructions.cpp +++ b/lib/VMCore/Instructions.cpp @@ -331,23 +331,23 @@ CallInst::CallInst(const CallInst &CI) } void CallInst::addAttribute(unsigned i, Attributes attr) { - AttrListPtr PAL = getAttributes(); + AttributeSet PAL = getAttributes(); PAL = PAL.addAttr(getContext(), i, attr); setAttributes(PAL); } void CallInst::removeAttribute(unsigned i, Attributes attr) { - AttrListPtr PAL = getAttributes(); + AttributeSet PAL = getAttributes(); PAL = PAL.removeAttr(getContext(), i, attr); setAttributes(PAL); } bool CallInst::hasFnAttr(Attributes::AttrVal A) const { - if (AttributeList.getParamAttributes(AttrListPtr::FunctionIndex) + if (AttributeList.getParamAttributes(AttributeSet::FunctionIndex) .hasAttribute(A)) return true; if (const Function *F = getCalledFunction()) - return F->getParamAttributes(AttrListPtr::FunctionIndex).hasAttribute(A); + return F->getParamAttributes(AttributeSet::FunctionIndex).hasAttribute(A); return false; } @@ -572,11 +572,11 @@ void InvokeInst::setSuccessorV(unsigned idx, BasicBlock *B) { } bool InvokeInst::hasFnAttr(Attributes::AttrVal A) const { - if (AttributeList.getParamAttributes(AttrListPtr::FunctionIndex). + if (AttributeList.getParamAttributes(AttributeSet::FunctionIndex). hasAttribute(A)) return true; if (const Function *F = getCalledFunction()) - return F->getParamAttributes(AttrListPtr::FunctionIndex).hasAttribute(A); + return F->getParamAttributes(AttributeSet::FunctionIndex).hasAttribute(A); return false; } @@ -589,13 +589,13 @@ bool InvokeInst::paramHasAttr(unsigned i, Attributes::AttrVal A) const { } void InvokeInst::addAttribute(unsigned i, Attributes attr) { - AttrListPtr PAL = getAttributes(); + AttributeSet PAL = getAttributes(); PAL = PAL.addAttr(getContext(), i, attr); setAttributes(PAL); } void InvokeInst::removeAttribute(unsigned i, Attributes attr) { - AttrListPtr PAL = getAttributes(); + AttributeSet PAL = getAttributes(); PAL = PAL.removeAttr(getContext(), i, attr); setAttributes(PAL); } diff --git a/lib/VMCore/Module.cpp b/lib/VMCore/Module.cpp index 05e549fe25..78f4eb82dc 100644 --- a/lib/VMCore/Module.cpp +++ b/lib/VMCore/Module.cpp @@ -137,7 +137,7 @@ void Module::getMDKindNames(SmallVectorImpl &Result) const { // Constant *Module::getOrInsertFunction(StringRef Name, FunctionType *Ty, - AttrListPtr AttributeList) { + AttributeSet AttributeList) { // See if we have a definition for the specified function already. GlobalValue *F = getNamedValue(Name); if (F == 0) { @@ -170,7 +170,7 @@ Constant *Module::getOrInsertFunction(StringRef Name, Constant *Module::getOrInsertTargetIntrinsic(StringRef Name, FunctionType *Ty, - AttrListPtr AttributeList) { + AttributeSet AttributeList) { // See if we have a definition for the specified function already. GlobalValue *F = getNamedValue(Name); if (F == 0) { @@ -187,7 +187,7 @@ Constant *Module::getOrInsertTargetIntrinsic(StringRef Name, Constant *Module::getOrInsertFunction(StringRef Name, FunctionType *Ty) { - return getOrInsertFunction(Name, Ty, AttrListPtr()); + return getOrInsertFunction(Name, Ty, AttributeSet()); } // getOrInsertFunction - Look up the specified function in the module symbol @@ -196,7 +196,7 @@ Constant *Module::getOrInsertFunction(StringRef Name, // arguments, which makes it easier for clients to use. // Constant *Module::getOrInsertFunction(StringRef Name, - AttrListPtr AttributeList, + AttributeSet AttributeList, Type *RetTy, ...) { va_list Args; va_start(Args, RetTy); @@ -229,7 +229,7 @@ Constant *Module::getOrInsertFunction(StringRef Name, // Build the function type and chain to the other getOrInsertFunction... return getOrInsertFunction(Name, FunctionType::get(RetTy, ArgTys, false), - AttrListPtr()); + AttributeSet()); } // getFunction - Look up the specified function in the module symbol table. diff --git a/lib/VMCore/Verifier.cpp b/lib/VMCore/Verifier.cpp index d21074bd2c..0c9493eb7d 100644 --- a/lib/VMCore/Verifier.cpp +++ b/lib/VMCore/Verifier.cpp @@ -299,7 +299,7 @@ namespace { SmallVectorImpl &ArgTys); void VerifyParameterAttrs(Attributes Attrs, Type *Ty, bool isReturnValue, const Value *V); - void VerifyFunctionAttrs(FunctionType *FT, const AttrListPtr &Attrs, + void VerifyFunctionAttrs(FunctionType *FT, const AttributeSet &Attrs, const Value *V); void WriteValue(const Value *V) { @@ -585,7 +585,7 @@ void Verifier::VerifyParameterAttrs(Attributes Attrs, Type *Ty, // VerifyFunctionAttrs - Check parameter attributes against a function type. // The value V is printed in error messages. void Verifier::VerifyFunctionAttrs(FunctionType *FT, - const AttrListPtr &Attrs, + const AttributeSet &Attrs, const Value *V) { if (Attrs.isEmpty()) return; @@ -651,7 +651,7 @@ void Verifier::VerifyFunctionAttrs(FunctionType *FT, "'noinline and alwaysinline' are incompatible!", V); } -static bool VerifyAttributeCount(const AttrListPtr &Attrs, unsigned Params) { +static bool VerifyAttributeCount(const AttributeSet &Attrs, unsigned Params) { if (Attrs.isEmpty()) return true; @@ -687,7 +687,7 @@ void Verifier::visitFunction(Function &F) { Assert1(!F.hasStructRetAttr() || F.getReturnType()->isVoidTy(), "Invalid struct return type!", &F); - const AttrListPtr &Attrs = F.getAttributes(); + const AttributeSet &Attrs = F.getAttributes(); Assert1(VerifyAttributeCount(Attrs, FT->getNumParams()), "Attributes after last parameter!", &F); @@ -1200,7 +1200,7 @@ void Verifier::VerifyCallSite(CallSite CS) { "Call parameter type does not match function signature!", CS.getArgument(i), FTy->getParamType(i), I); - const AttrListPtr &Attrs = CS.getAttributes(); + const AttributeSet &Attrs = CS.getAttributes(); Assert1(VerifyAttributeCount(Attrs, CS.arg_size()), "Attributes after last parameter!", I); diff --git a/unittests/VMCore/PassManagerTest.cpp b/unittests/VMCore/PassManagerTest.cpp index 26030125d9..6cfc0369a4 100644 --- a/unittests/VMCore/PassManagerTest.cpp +++ b/unittests/VMCore/PassManagerTest.cpp @@ -431,7 +431,7 @@ namespace llvm { /*Linkage=*/GlobalValue::ExternalLinkage, /*Name=*/"test1", mod); func_test1->setCallingConv(CallingConv::C); - AttrListPtr func_test1_PAL; + AttributeSet func_test1_PAL; func_test1->setAttributes(func_test1_PAL); Function* func_test2 = Function::Create( @@ -439,7 +439,7 @@ namespace llvm { /*Linkage=*/GlobalValue::ExternalLinkage, /*Name=*/"test2", mod); func_test2->setCallingConv(CallingConv::C); - AttrListPtr func_test2_PAL; + AttributeSet func_test2_PAL; func_test2->setAttributes(func_test2_PAL); Function* func_test3 = Function::Create( @@ -447,7 +447,7 @@ namespace llvm { /*Linkage=*/GlobalValue::ExternalLinkage, /*Name=*/"test3", mod); func_test3->setCallingConv(CallingConv::C); - AttrListPtr func_test3_PAL; + AttributeSet func_test3_PAL; func_test3->setAttributes(func_test3_PAL); Function* func_test4 = Function::Create( @@ -455,7 +455,7 @@ namespace llvm { /*Linkage=*/GlobalValue::ExternalLinkage, /*Name=*/"test4", mod); func_test4->setCallingConv(CallingConv::C); - AttrListPtr func_test4_PAL; + AttributeSet func_test4_PAL; func_test4->setAttributes(func_test4_PAL); // Global Variable Declarations @@ -475,7 +475,7 @@ namespace llvm { // Block entry (label_entry) CallInst* int32_3 = CallInst::Create(func_test2, "", label_entry); int32_3->setCallingConv(CallingConv::C); - int32_3->setTailCall(false);AttrListPtr int32_3_PAL; + int32_3->setTailCall(false);AttributeSet int32_3_PAL; int32_3->setAttributes(int32_3_PAL); ReturnInst::Create(getGlobalContext(), int32_3, label_entry); @@ -490,7 +490,7 @@ namespace llvm { // Block entry (label_entry_5) CallInst* int32_6 = CallInst::Create(func_test3, "", label_entry_5); int32_6->setCallingConv(CallingConv::C); - int32_6->setTailCall(false);AttrListPtr int32_6_PAL; + int32_6->setTailCall(false);AttributeSet int32_6_PAL; int32_6->setAttributes(int32_6_PAL); ReturnInst::Create(getGlobalContext(), int32_6, label_entry_5); @@ -505,7 +505,7 @@ namespace llvm { // Block entry (label_entry_8) CallInst* int32_9 = CallInst::Create(func_test1, "", label_entry_8); int32_9->setCallingConv(CallingConv::C); - int32_9->setTailCall(false);AttrListPtr int32_9_PAL; + int32_9->setTailCall(false);AttributeSet int32_9_PAL; int32_9->setAttributes(int32_9_PAL); ReturnInst::Create(getGlobalContext(), int32_9, label_entry_8); diff --git a/utils/TableGen/IntrinsicEmitter.cpp b/utils/TableGen/IntrinsicEmitter.cpp index fe55242930..967c58b3d2 100644 --- a/utils/TableGen/IntrinsicEmitter.cpp +++ b/utils/TableGen/IntrinsicEmitter.cpp @@ -511,10 +511,10 @@ EmitAttributes(const std::vector &Ints, raw_ostream &OS) { OS << "// Add parameter attributes that are not common to all intrinsics.\n"; OS << "#ifdef GET_INTRINSIC_ATTRIBUTES\n"; if (TargetOnly) - OS << "static AttrListPtr getAttributes(LLVMContext &C, " << TargetPrefix + OS << "static AttributeSet getAttributes(LLVMContext &C, " << TargetPrefix << "Intrinsic::ID id) {\n"; else - OS << "AttrListPtr Intrinsic::getAttributes(LLVMContext &C, ID id) {\n"; + OS << "AttributeSet Intrinsic::getAttributes(LLVMContext &C, ID id) {\n"; // Compute the maximum number of attribute arguments and the map typedef std::map &Ints, raw_ostream &OS) { break; } OS << " AWI[" << numAttrs++ << "] = AttributeWithIndex::get(C, " - << "AttrListPtr::FunctionIndex, AttrVec);\n"; + << "AttributeSet::FunctionIndex, AttrVec);\n"; } if (numAttrs) { OS << " NumAttrs = " << numAttrs << ";\n"; OS << " break;\n"; } else { - OS << " return AttrListPtr();\n"; + OS << " return AttributeSet();\n"; } } OS << " }\n"; OS << " }\n"; - OS << " return AttrListPtr::get(C, ArrayRef(AWI, " + OS << " return AttributeSet::get(C, ArrayRef(AWI, " "NumAttrs));\n"; OS << "}\n"; OS << "#endif // GET_INTRINSIC_ATTRIBUTES\n\n"; -- cgit v1.2.3-70-g09d2