Make LLVMContext and LLVMContextImpl classes instead of structs.
authorBenjamin Kramer <benny.kra@googlemail.com>
Tue, 11 Aug 2009 17:45:13 +0000 (17:45 +0000)
committerBenjamin Kramer <benny.kra@googlemail.com>
Tue, 11 Aug 2009 17:45:13 +0000 (17:45 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78690 91177308-0d34-0410-b5e6-96231b3b80d8

40 files changed:
include/llvm/Analysis/ConstantFolding.h
include/llvm/Analysis/DebugInfo.h
include/llvm/Analysis/ScalarEvolution.h
include/llvm/Analysis/SparsePropagation.h
include/llvm/Analysis/ValueTracking.h
include/llvm/Assembly/Parser.h
include/llvm/BasicBlock.h
include/llvm/Bitcode/Archive.h
include/llvm/Bitcode/ReaderWriter.h
include/llvm/CodeGen/ValueTypes.h
include/llvm/Constant.h
include/llvm/Constants.h
include/llvm/Debugger/Debugger.h
include/llvm/DerivedTypes.h
include/llvm/Function.h
include/llvm/GlobalVariable.h
include/llvm/InstrTypes.h
include/llvm/Instruction.h
include/llvm/Instructions.h
include/llvm/Intrinsics.h
include/llvm/LLVMContext.h
include/llvm/Linker.h
include/llvm/Metadata.h
include/llvm/Module.h
include/llvm/Support/ConstantFolder.h
include/llvm/Support/NoFolder.h
include/llvm/Support/TargetFolder.h
include/llvm/Transforms/Utils/Cloning.h
include/llvm/Transforms/Utils/Local.h
include/llvm/Transforms/Utils/PromoteMemToReg.h
include/llvm/Transforms/Utils/ValueMapper.h
include/llvm/Value.h
lib/Archive/ArchiveInternals.h
lib/AsmParser/LLLexer.h
lib/Bitcode/Reader/BitcodeReader.h
lib/VMCore/ConstantFold.h
lib/VMCore/LLVMContext.cpp
lib/VMCore/LLVMContextImpl.h
tools/bugpoint/BugDriver.h
tools/llvm-db/CLIDebugger.h

index 3293d263a09444f0a30c90506aacd4a845489970..3e393ff6917cc4f84ce02954effc23cff01844b8 100644 (file)
@@ -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
index 5c8b31ad5e2b9fd58d896054377d7560dd0d559b..79f4a58e42eb3e43a5688eea7a08276e357ebca4 100644 (file)
@@ -40,7 +40,7 @@ namespace llvm {
   class DebugLoc;
   struct DebugLocTracker;
   class Instruction;
-  struct LLVMContext;
+  class LLVMContext;
 
   class DIDescriptor {
   protected:    
index c008051d5c95d6be798a2e2dd457c3650c09f6bd..b98f5352173182c1dedfbbf66e4d0367fd3a27c6 100644 (file)
@@ -41,7 +41,7 @@ namespace llvm {
   class Type;
   class ScalarEvolution;
   class TargetData;
-  struct LLVMContext;
+  class LLVMContext;
   class Loop;
   class LoopInfo;
   class Operator;
index 877823303fd0857e0956cd913df92b5cb1c384b3..638008d78cd74aba57c7e85e709cc50a71521c21 100644 (file)
@@ -31,7 +31,7 @@ namespace llvm {
   class BasicBlock;
   class Function;
   class SparseSolver;
-  struct LLVMContext;
+  class LLVMContext;
 
   template<typename T> class SmallVectorImpl;
   
index fa46921b593d67daa0b527e55bde6af29e10be79..1ebd9c26c4a3dac7f21e4fc9cd4836d93d88440b 100644 (file)
@@ -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
index 6ab43825c87572612b6fcfa7ad9e0042eab5a474..966abaaa2067a5bccf6c5a05b5579f580ec069dd 100644 (file)
@@ -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
index cc5c8355db0cf52fffe9aa7e947d362d14ce0d7c..eabc1a0d2b6a31c613d8c32a1cb983f8f5b5f728 100644 (file)
@@ -22,7 +22,7 @@
 namespace llvm {
 
 class TerminatorInst;
-struct LLVMContext;
+class LLVMContext;
 
 template<> struct ilist_traits<Instruction>
   : public SymbolTableListTraits<Instruction, BasicBlock> {
index 8a1d3125ee0852ce8c679f11813a4d5608107cc9..13583c0d5ecd6901354c50d37eb47a6931620a40 100644 (file)
@@ -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
index 9890f29307d75eba274e1b1a5bf9a21fc9520808..3d33d75a06a199400d851c5bb5f290deddf144e9 100644 (file)
@@ -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
index b32bda9c7921dbdd40c09f595ce7be5d3fa81925..2427f99b971dfdb3ca291304a8a32ea0e5cbbfe2 100644 (file)
@@ -23,7 +23,7 @@
 
 namespace llvm {
   class Type;
-  struct LLVMContext;
+  class LLVMContext;
 
   struct EVT { // EVT = Machine Value Type
   public:
index 9c4365febe272ec4171f9998993202efaae426ba..a42c7d43717116b50845870050d7735d4d160ea1 100644 (file)
@@ -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
index 1aaef8045a621b7f68ec5adfac700b7ef8eb6f8f..3b674cda574534a37da83ad69e80b0c87eb8521e 100644 (file)
@@ -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:
index 69b13c8a183363dfddadf7640ae470cc4792ce6d..42de35660c265fa489f9aa54dce6d7d49e4ab646 100644 (file)
@@ -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
index b50ee5549f631cfd81836aa9e6b2c31ce51d4269..e7b226be7b5f9f91a254c9bf8f7d9571da426ba4 100644 (file)
@@ -31,7 +31,7 @@ class PointerValType;
 class VectorValType;
 class IntegerValType;
 class APInt;
-struct LLVMContext;
+class LLVMContext;
 
 class DerivedType : public Type {
   friend class Type;
index 7eec336c3b7b445b85c737e8e2f51b5ef64e052a..90d9b0ee46e12a55dcecdbac826e8632ae998bb0 100644 (file)
@@ -26,7 +26,7 @@
 namespace llvm {
 
 class FunctionType;
-struct LLVMContext;
+class LLVMContext;
 
 // Traits for intrusive list of basic blocks...
 template<> struct ilist_traits<BasicBlock>
index 7855befb935eb3589112b5dfb43a6aec09a7c2a8..f18554d53b5c64d911366a66f017ed998760e4bc 100644 (file)
@@ -28,7 +28,7 @@ namespace llvm {
 
 class Module;
 class Constant;
-struct LLVMContext;
+class LLVMContext;
 template<typename ValueSubClass, typename ItemParentClass>
   class SymbolTableListTraits;
 
index 771e9f799b3e605e10c034afdb2a49375cf0fcbe..9df99a7c6fa956008ad4497c9efdfeba5c941d8b 100644 (file)
@@ -23,7 +23,7 @@
 
 namespace llvm {
 
-struct LLVMContext;
+class LLVMContext;
 
 //===----------------------------------------------------------------------===//
 //                            TerminatorInst Class
index 3ce1745d1a42a5cd34edd0e24c230529fadfe6e1..924b19554a807a529a84631d57ad43f656c07379 100644 (file)
@@ -20,7 +20,7 @@
 
 namespace llvm {
 
-struct LLVMContext;
+class LLVMContext;
 
 template<typename ValueSubClass, typename ItemParentClass>
   class SymbolTableListTraits;
index d326141698edb5f4f828ac9045e1f7512b9e4a00..ecfddf2cf9a706da81353e21acda259dca9eb8b9 100644 (file)
@@ -29,7 +29,7 @@ namespace llvm {
 class ConstantInt;
 class ConstantRange;
 class APInt;
-struct LLVMContext;
+class LLVMContext;
 
 //===----------------------------------------------------------------------===//
 //                             AllocationInst Class
index 5750a27d7326eb3b2172565a6a52e6fe7190c2d3..8f1b1aee1f5a9fd22a3acf6579a507efeda01bbf 100644 (file)
@@ -23,7 +23,7 @@ namespace llvm {
 class Type;
 class FunctionType;
 class Function;
-struct LLVMContext;
+class LLVMContext;
 class Module;
 class AttrListPtr;
 
index c72b21c12ef58e59e7cfdc670eef36a61fe3f4d3..95b4eaa2941da92de8c5da2847259c2e54edac73 100644 (file)
 
 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();
index 43db5961d4db60b7635eba7cabf669a07d2d8fce..2f3d37408200d436a389a4467460f532b2d74e28 100644 (file)
@@ -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
index d5ef7cbb5a1f6ded9b03d627a64085145ef831d2..3803b5a5f57580997d91cfb1c549a9cf90d1ecb3 100644 (file)
@@ -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
index 709b122998c46b2e52e3f377b4fe8a1f778a7a49..aa91af1a4ab7087e95c9436a4ba4a76c5259bfc9 100644 (file)
@@ -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> {
index ab9ecc69fc7d86ad57494afdf58537e33887d44d..422d1ad00d29f18f6323f297e47f30aac88987cf 100644 (file)
@@ -21,7 +21,7 @@
 
 namespace llvm {
 
-struct LLVMContext;
+class LLVMContext;
 
 /// ConstantFolder - Create constants with minimum, target independent, folding.
 class ConstantFolder {
index d5198a2ad892c373e5fd06f1adbcc141c7f2cd57..b89c084b5862fa1d5ae05f4e4a1d322173c8e02e 100644 (file)
@@ -28,7 +28,7 @@
 
 namespace llvm {
 
-struct LLVMContext;
+class LLVMContext;
 
 /// NoFolder - Create "constants" (actually, values) with no folding.
 class NoFolder {
index 900c32688591bace1c9a641d1a48eb0ab1b4b5ee..473b0ab03c9c128242a846317b51cde98cdcf1f0 100644 (file)
@@ -25,7 +25,7 @@
 namespace llvm {
 
 class TargetData;
-struct LLVMContext;
+class LLVMContext;
 
 /// TargetFolder - Create constants with target dependent folding.
 class TargetFolder {
index b709edfac1b9083bb49e5258bf010aea36292658..66cac9fea4b68021cec1f35589c700881333cb5a 100644 (file)
@@ -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
 ///
index db5793166c56a733b8accdd74e5cade362776e6a..32e7ae81b1b757bae6f7d7f9169cba32e2e97023 100644 (file)
@@ -27,7 +27,7 @@ class PHINode;
 class AllocaInst;
 class ConstantExpr;
 class TargetData;
-struct LLVMContext;
+class LLVMContext;
 struct DbgInfoIntrinsic;
 
 template<typename T> class SmallVectorImpl;
index 3dba38ee264eb7473ae50e5d8831f5b1b6d15497..71a077e8625eef1f4875104d00fe43f521959fc2 100644 (file)
@@ -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...
index ed3ea2bdc40a92c122c3adfade75424c65eaadb9..d31edab5b551e25a3632d1652daf24fea02fdd3f 100644 (file)
@@ -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);
index 3881e351da5277c66a8d75a6e6b354b6fd528616..b1db1ce3e1ee8831c1923c410f481a88ccac0a73 100644 (file)
@@ -42,7 +42,7 @@ typedef StringMapEntry<Value*> ValueName;
 class raw_ostream;
 class AssemblyAnnotationWriter;
 class ValueHandleBase;
-struct LLVMContext;
+class LLVMContext;
 
 //===----------------------------------------------------------------------===//
 //                                 Value Class
index 98f9c896c59cbe4879f1580a7dc0ef590f04ab11..d187ed91d724625597ac91c1e9a074305671516c 100644 (file)
@@ -31,7 +31,7 @@
 
 namespace llvm {
 
-  struct LLVMContext;
+  class LLVMContext;
 
   /// The ArchiveMemberHeader structure is used internally for bitcode
   /// archives.
index 667ab2c2ede7fcb202036dc5bb085287a613bd18..de39272f45e27a3bb3dd3f9935d52b3dd2805119 100644 (file)
@@ -24,7 +24,7 @@ namespace llvm {
   class MemoryBuffer;
   class Type;
   class SMDiagnostic;
-  struct LLVMContext;
+  class LLVMContext;
 
   class LLLexer {
     const char *CurPtr;
index a1f91133ea11a7d010e299bdd962ba48e5f74c2e..bd048885a65ec8408026e7faca294f39cb612fce 100644 (file)
@@ -26,7 +26,7 @@
 
 namespace llvm {
   class MemoryBuffer;
-  struct LLVMContext;
+  class LLVMContext;
   
 //===----------------------------------------------------------------------===//
 //                          BitcodeReaderValueList Class
index c70a04b7fc61731ac92e4ddcd627621ae5b20d8b..afa997876721329ec348f3316b374520ccf13f56 100644 (file)
@@ -23,7 +23,7 @@ namespace llvm {
   class Value;
   class Constant;
   class Type;
-  struct LLVMContext;
+  class LLVMContext;
 
   // Constant fold various types of instruction...
   Constant *ConstantFoldCastInstruction(
index 56a429dd39069d68f4f46c3c3d153a90649398d6..aa9dc3671a089b10ff15c43a8847949c197b4905 100644 (file)
@@ -8,7 +8,7 @@
 //===----------------------------------------------------------------------===//
 //
 //  This file implements LLVMContext, as a wrapper around the opaque
-// struct LLVMContextImpl.
+//  class LLVMContextImpl.
 //
 //===----------------------------------------------------------------------===//
 
index 245aa4a7043cb7f0d723016ec0d011aa8a86344e..30a7fc4af930d6473c3963716d1d21d48e9c78c6 100644 (file)
@@ -34,7 +34,7 @@ class ConstantInt;
 class ConstantFP;
 class MDString;
 class MDNode;
-struct LLVMContext;
+class LLVMContext;
 class Type;
 class Value;
 
@@ -90,7 +90,8 @@ struct DenseMapAPFloatKeyInfo {
   static bool isPod() { return false; }
 };
 
-struct LLVMContextImpl {
+class LLVMContextImpl {
+public:
   sys::SmartRWMutex<true> ConstantsLock;
   
   typedef DenseMap<DenseMapAPIntKeyInfo::KeyTy, ConstantInt*, 
index 5f4a1300a0406fe1d1a169dbf4e52907ff344ea8..db35c851d9a43322878e3921e0f654077ec3fbbd 100644 (file)
@@ -30,7 +30,7 @@ class Function;
 class BasicBlock;
 class AbstractInterpreter;
 class Instruction;
-struct LLVMContext;
+class LLVMContext;
 
 class DebugCrashes;
 
index 349c5e69a367b643f28b21bacdabc02c81b9194c..0595b3debadddbbd9a853f60a29c77867fa7c7d9 100644 (file)
@@ -24,7 +24,7 @@ namespace llvm {
   struct SourceLanguage;
   class ProgramInfo;
   class RuntimeInfo;
-  struct LLVMContext;
+  class LLVMContext;
 
   /// CLIDebugger - This class implements the command line interface for the
   /// LLVM debugger.