diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2009-08-11 17:45:13 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2009-08-11 17:45:13 +0000 |
commit | 12ddd409535b52a7fa5157ded9a4cedd161fedb6 (patch) | |
tree | b3a6553c71216593be569cd25abbba245b085aae /include | |
parent | c588d558100b488ff20f560b5c35d3bec4790aff (diff) |
Make LLVMContext and LLVMContextImpl classes instead of structs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78690 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
32 files changed, 35 insertions, 34 deletions
diff --git a/include/llvm/Analysis/ConstantFolding.h b/include/llvm/Analysis/ConstantFolding.h index 3293d263a0..3e393ff691 100644 --- a/include/llvm/Analysis/ConstantFolding.h +++ b/include/llvm/Analysis/ConstantFolding.h @@ -22,7 +22,7 @@ namespace llvm { class TargetData; class Function; class Type; - struct LLVMContext; + class LLVMContext; /// ConstantFoldInstruction - Attempt to constant fold the specified /// instruction. If successful, the constant result is returned, if not, null diff --git a/include/llvm/Analysis/DebugInfo.h b/include/llvm/Analysis/DebugInfo.h index 5c8b31ad5e..79f4a58e42 100644 --- a/include/llvm/Analysis/DebugInfo.h +++ b/include/llvm/Analysis/DebugInfo.h @@ -40,7 +40,7 @@ namespace llvm { class DebugLoc; struct DebugLocTracker; class Instruction; - struct LLVMContext; + class LLVMContext; class DIDescriptor { protected: diff --git a/include/llvm/Analysis/ScalarEvolution.h b/include/llvm/Analysis/ScalarEvolution.h index c008051d5c..b98f535217 100644 --- a/include/llvm/Analysis/ScalarEvolution.h +++ b/include/llvm/Analysis/ScalarEvolution.h @@ -41,7 +41,7 @@ namespace llvm { class Type; class ScalarEvolution; class TargetData; - struct LLVMContext; + class LLVMContext; class Loop; class LoopInfo; class Operator; diff --git a/include/llvm/Analysis/SparsePropagation.h b/include/llvm/Analysis/SparsePropagation.h index 877823303f..638008d78c 100644 --- a/include/llvm/Analysis/SparsePropagation.h +++ b/include/llvm/Analysis/SparsePropagation.h @@ -31,7 +31,7 @@ namespace llvm { class BasicBlock; class Function; class SparseSolver; - struct LLVMContext; + class LLVMContext; template<typename T> class SmallVectorImpl; diff --git a/include/llvm/Analysis/ValueTracking.h b/include/llvm/Analysis/ValueTracking.h index fa46921b59..1ebd9c26c4 100644 --- a/include/llvm/Analysis/ValueTracking.h +++ b/include/llvm/Analysis/ValueTracking.h @@ -23,7 +23,7 @@ namespace llvm { class Instruction; class APInt; class TargetData; - struct LLVMContext; + class LLVMContext; /// ComputeMaskedBits - Determine which of the bits specified in Mask are /// known to be either zero or one and return them in the KnownZero/KnownOne diff --git a/include/llvm/Assembly/Parser.h b/include/llvm/Assembly/Parser.h index 6ab43825c8..966abaaa20 100644 --- a/include/llvm/Assembly/Parser.h +++ b/include/llvm/Assembly/Parser.h @@ -21,7 +21,7 @@ namespace llvm { class Module; class SMDiagnostic; class raw_ostream; -struct LLVMContext; +class LLVMContext; /// This function is the main interface to the LLVM Assembly Parser. It parses /// an ASCII file that (presumably) contains LLVM Assembly code. It returns a diff --git a/include/llvm/BasicBlock.h b/include/llvm/BasicBlock.h index cc5c8355db..eabc1a0d2b 100644 --- a/include/llvm/BasicBlock.h +++ b/include/llvm/BasicBlock.h @@ -22,7 +22,7 @@ namespace llvm { class TerminatorInst; -struct LLVMContext; +class LLVMContext; template<> struct ilist_traits<Instruction> : public SymbolTableListTraits<Instruction, BasicBlock> { diff --git a/include/llvm/Bitcode/Archive.h b/include/llvm/Bitcode/Archive.h index 8a1d3125ee..13583c0d5e 100644 --- a/include/llvm/Bitcode/Archive.h +++ b/include/llvm/Bitcode/Archive.h @@ -32,7 +32,7 @@ class ModuleProvider; // From VMCore class Module; // From VMCore class Archive; // Declared below class ArchiveMemberHeader; // Internal implementation class -struct LLVMContext; // Global data +class LLVMContext; // Global data /// This class is the main class manipulated by users of the Archive class. It /// holds information about one member of the Archive. It is also the element diff --git a/include/llvm/Bitcode/ReaderWriter.h b/include/llvm/Bitcode/ReaderWriter.h index 9890f29307..3d33d75a06 100644 --- a/include/llvm/Bitcode/ReaderWriter.h +++ b/include/llvm/Bitcode/ReaderWriter.h @@ -23,7 +23,7 @@ namespace llvm { class MemoryBuffer; class ModulePass; class BitstreamWriter; - struct LLVMContext; + class LLVMContext; class raw_ostream; /// getBitcodeModuleProvider - Read the header of the specified bitcode buffer diff --git a/include/llvm/CodeGen/ValueTypes.h b/include/llvm/CodeGen/ValueTypes.h index b32bda9c79..2427f99b97 100644 --- a/include/llvm/CodeGen/ValueTypes.h +++ b/include/llvm/CodeGen/ValueTypes.h @@ -23,7 +23,7 @@ namespace llvm { class Type; - struct LLVMContext; + class LLVMContext; struct EVT { // EVT = Machine Value Type public: diff --git a/include/llvm/Constant.h b/include/llvm/Constant.h index 9c4365febe..a42c7d4371 100644 --- a/include/llvm/Constant.h +++ b/include/llvm/Constant.h @@ -20,7 +20,7 @@ namespace llvm { class APInt; template<typename T> class SmallVectorImpl; - struct LLVMContext; + class LLVMContext; /// This is an important base class in LLVM. It provides the common facilities /// of all constant values in an LLVM program. A constant is a value that is diff --git a/include/llvm/Constants.h b/include/llvm/Constants.h index 1aaef8045a..3b674cda57 100644 --- a/include/llvm/Constants.h +++ b/include/llvm/Constants.h @@ -231,7 +231,7 @@ class ConstantFP : public Constant { APFloat Val; void *operator new(size_t, unsigned);// DO NOT IMPLEMENT ConstantFP(const ConstantFP &); // DO NOT IMPLEMENT - friend struct LLVMContextImpl; + friend class LLVMContextImpl; protected: ConstantFP(const Type *Ty, const APFloat& V); protected: diff --git a/include/llvm/Debugger/Debugger.h b/include/llvm/Debugger/Debugger.h index 69b13c8a18..42de35660c 100644 --- a/include/llvm/Debugger/Debugger.h +++ b/include/llvm/Debugger/Debugger.h @@ -20,7 +20,7 @@ namespace llvm { class Module; class InferiorProcess; - struct LLVMContext; + class LLVMContext; /// Debugger class - This class implements the LLVM source-level debugger. /// This allows clients to handle the user IO processing without having to diff --git a/include/llvm/DerivedTypes.h b/include/llvm/DerivedTypes.h index b50ee5549f..e7b226be7b 100644 --- a/include/llvm/DerivedTypes.h +++ b/include/llvm/DerivedTypes.h @@ -31,7 +31,7 @@ class PointerValType; class VectorValType; class IntegerValType; class APInt; -struct LLVMContext; +class LLVMContext; class DerivedType : public Type { friend class Type; diff --git a/include/llvm/Function.h b/include/llvm/Function.h index 7eec336c3b..90d9b0ee46 100644 --- a/include/llvm/Function.h +++ b/include/llvm/Function.h @@ -26,7 +26,7 @@ namespace llvm { class FunctionType; -struct LLVMContext; +class LLVMContext; // Traits for intrusive list of basic blocks... template<> struct ilist_traits<BasicBlock> diff --git a/include/llvm/GlobalVariable.h b/include/llvm/GlobalVariable.h index 7855befb93..f18554d53b 100644 --- a/include/llvm/GlobalVariable.h +++ b/include/llvm/GlobalVariable.h @@ -28,7 +28,7 @@ namespace llvm { class Module; class Constant; -struct LLVMContext; +class LLVMContext; template<typename ValueSubClass, typename ItemParentClass> class SymbolTableListTraits; diff --git a/include/llvm/InstrTypes.h b/include/llvm/InstrTypes.h index 771e9f799b..9df99a7c6f 100644 --- a/include/llvm/InstrTypes.h +++ b/include/llvm/InstrTypes.h @@ -23,7 +23,7 @@ namespace llvm { -struct LLVMContext; +class LLVMContext; //===----------------------------------------------------------------------===// // TerminatorInst Class diff --git a/include/llvm/Instruction.h b/include/llvm/Instruction.h index 3ce1745d1a..924b19554a 100644 --- a/include/llvm/Instruction.h +++ b/include/llvm/Instruction.h @@ -20,7 +20,7 @@ namespace llvm { -struct LLVMContext; +class LLVMContext; template<typename ValueSubClass, typename ItemParentClass> class SymbolTableListTraits; diff --git a/include/llvm/Instructions.h b/include/llvm/Instructions.h index d326141698..ecfddf2cf9 100644 --- a/include/llvm/Instructions.h +++ b/include/llvm/Instructions.h @@ -29,7 +29,7 @@ namespace llvm { class ConstantInt; class ConstantRange; class APInt; -struct LLVMContext; +class LLVMContext; //===----------------------------------------------------------------------===// // AllocationInst Class diff --git a/include/llvm/Intrinsics.h b/include/llvm/Intrinsics.h index 5750a27d73..8f1b1aee1f 100644 --- a/include/llvm/Intrinsics.h +++ b/include/llvm/Intrinsics.h @@ -23,7 +23,7 @@ namespace llvm { class Type; class FunctionType; class Function; -struct LLVMContext; +class LLVMContext; class Module; class AttrListPtr; diff --git a/include/llvm/LLVMContext.h b/include/llvm/LLVMContext.h index c72b21c12e..95b4eaa294 100644 --- a/include/llvm/LLVMContext.h +++ b/include/llvm/LLVMContext.h @@ -17,14 +17,15 @@ namespace llvm { -struct LLVMContextImpl; +class LLVMContextImpl; /// This is an important class for using LLVM in a threaded context. It /// (opaquely) owns and manages the core "global" data of LLVM's core /// infrastructure, including the type and constant uniquing tables. /// LLVMContext itself provides no locking guarantees, so you should be careful /// to have one context per thread. -struct LLVMContext { +class LLVMContext { +public: LLVMContextImpl* pImpl; bool RemoveDeadMetadata(); LLVMContext(); diff --git a/include/llvm/Linker.h b/include/llvm/Linker.h index 43db5961d4..2f3d374082 100644 --- a/include/llvm/Linker.h +++ b/include/llvm/Linker.h @@ -21,7 +21,7 @@ namespace llvm { class Module; -struct LLVMContext; +class LLVMContext; /// This class provides the core functionality of linking in LLVM. It retains a /// Module object which is the composite of the modules and libraries linked diff --git a/include/llvm/Metadata.h b/include/llvm/Metadata.h index d5ef7cbb5a..3803b5a5f5 100644 --- a/include/llvm/Metadata.h +++ b/include/llvm/Metadata.h @@ -26,7 +26,7 @@ namespace llvm { class Constant; -struct LLVMContext; +class LLVMContext; template<class ConstantClass, class TypeClass, class ValType> struct ConstantCreator; @@ -205,7 +205,7 @@ template<typename ValueSubClass, typename ItemParentClass> class NamedMDNode : public MetadataBase, public ilist_node<NamedMDNode> { friend class SymbolTableListTraits<NamedMDNode, Module>; - friend struct LLVMContextImpl; + friend class LLVMContextImpl; NamedMDNode(const NamedMDNode &); // DO NOT IMPLEMENT void *operator new(size_t, unsigned); // DO NOT IMPLEMENT diff --git a/include/llvm/Module.h b/include/llvm/Module.h index 709b122998..aa91af1a4a 100644 --- a/include/llvm/Module.h +++ b/include/llvm/Module.h @@ -26,7 +26,7 @@ namespace llvm { class GlobalValueRefMap; // Used by ConstantVals.cpp class FunctionType; -struct LLVMContext; +class LLVMContext; template<> struct ilist_traits<Function> : public SymbolTableListTraits<Function, Module> { diff --git a/include/llvm/Support/ConstantFolder.h b/include/llvm/Support/ConstantFolder.h index ab9ecc69fc..422d1ad00d 100644 --- a/include/llvm/Support/ConstantFolder.h +++ b/include/llvm/Support/ConstantFolder.h @@ -21,7 +21,7 @@ namespace llvm { -struct LLVMContext; +class LLVMContext; /// ConstantFolder - Create constants with minimum, target independent, folding. class ConstantFolder { diff --git a/include/llvm/Support/NoFolder.h b/include/llvm/Support/NoFolder.h index d5198a2ad8..b89c084b58 100644 --- a/include/llvm/Support/NoFolder.h +++ b/include/llvm/Support/NoFolder.h @@ -28,7 +28,7 @@ namespace llvm { -struct LLVMContext; +class LLVMContext; /// NoFolder - Create "constants" (actually, values) with no folding. class NoFolder { diff --git a/include/llvm/Support/TargetFolder.h b/include/llvm/Support/TargetFolder.h index 900c326885..473b0ab03c 100644 --- a/include/llvm/Support/TargetFolder.h +++ b/include/llvm/Support/TargetFolder.h @@ -25,7 +25,7 @@ namespace llvm { class TargetData; -struct LLVMContext; +class LLVMContext; /// TargetFolder - Create constants with target dependent folding. class TargetFolder { diff --git a/include/llvm/Transforms/Utils/Cloning.h b/include/llvm/Transforms/Utils/Cloning.h index b709edfac1..66cac9fea4 100644 --- a/include/llvm/Transforms/Utils/Cloning.h +++ b/include/llvm/Transforms/Utils/Cloning.h @@ -38,7 +38,7 @@ class CallGraph; class TargetData; class Loop; class LoopInfo; -struct LLVMContext; +class LLVMContext; /// CloneModule - Return an exact copy of the specified module /// diff --git a/include/llvm/Transforms/Utils/Local.h b/include/llvm/Transforms/Utils/Local.h index db5793166c..32e7ae81b1 100644 --- a/include/llvm/Transforms/Utils/Local.h +++ b/include/llvm/Transforms/Utils/Local.h @@ -27,7 +27,7 @@ class PHINode; class AllocaInst; class ConstantExpr; class TargetData; -struct LLVMContext; +class LLVMContext; struct DbgInfoIntrinsic; template<typename T> class SmallVectorImpl; diff --git a/include/llvm/Transforms/Utils/PromoteMemToReg.h b/include/llvm/Transforms/Utils/PromoteMemToReg.h index 3dba38ee26..71a077e862 100644 --- a/include/llvm/Transforms/Utils/PromoteMemToReg.h +++ b/include/llvm/Transforms/Utils/PromoteMemToReg.h @@ -23,7 +23,7 @@ class AllocaInst; class DominatorTree; class DominanceFrontier; class AliasSetTracker; -struct LLVMContext; +class LLVMContext; /// isAllocaPromotable - Return true if this alloca is legal for promotion. /// This is true if there are only loads and stores to the alloca... diff --git a/include/llvm/Transforms/Utils/ValueMapper.h b/include/llvm/Transforms/Utils/ValueMapper.h index ed3ea2bdc4..d31edab5b5 100644 --- a/include/llvm/Transforms/Utils/ValueMapper.h +++ b/include/llvm/Transforms/Utils/ValueMapper.h @@ -20,7 +20,7 @@ namespace llvm { class Value; class Instruction; - struct LLVMContext; + class LLVMContext; typedef DenseMap<const Value *, Value *> ValueMapTy; Value *MapValue(const Value *V, ValueMapTy &VM, LLVMContext &Context); diff --git a/include/llvm/Value.h b/include/llvm/Value.h index 3881e351da..b1db1ce3e1 100644 --- a/include/llvm/Value.h +++ b/include/llvm/Value.h @@ -42,7 +42,7 @@ typedef StringMapEntry<Value*> ValueName; class raw_ostream; class AssemblyAnnotationWriter; class ValueHandleBase; -struct LLVMContext; +class LLVMContext; //===----------------------------------------------------------------------===// // Value Class |