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
This commit is contained in:
Benjamin Kramer 2009-08-11 17:45:13 +00:00
parent c588d55810
commit 12ddd40953
40 changed files with 45 additions and 43 deletions

View 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

View File

@ -40,7 +40,7 @@ namespace llvm {
class DebugLoc;
struct DebugLocTracker;
class Instruction;
struct LLVMContext;
class LLVMContext;
class DIDescriptor {
protected:

View File

@ -41,7 +41,7 @@ namespace llvm {
class Type;
class ScalarEvolution;
class TargetData;
struct LLVMContext;
class LLVMContext;
class Loop;
class LoopInfo;
class Operator;

View File

@ -31,7 +31,7 @@ namespace llvm {
class BasicBlock;
class Function;
class SparseSolver;
struct LLVMContext;
class LLVMContext;
template<typename T> class SmallVectorImpl;

View 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

View 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

View File

@ -22,7 +22,7 @@
namespace llvm {
class TerminatorInst;
struct LLVMContext;
class LLVMContext;
template<> struct ilist_traits<Instruction>
: public SymbolTableListTraits<Instruction, BasicBlock> {

View 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

View 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

View File

@ -23,7 +23,7 @@
namespace llvm {
class Type;
struct LLVMContext;
class LLVMContext;
struct EVT { // EVT = Machine Value Type
public:

View 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

View 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:

View 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

View File

@ -31,7 +31,7 @@ class PointerValType;
class VectorValType;
class IntegerValType;
class APInt;
struct LLVMContext;
class LLVMContext;
class DerivedType : public Type {
friend class Type;

View 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>

View File

@ -28,7 +28,7 @@ namespace llvm {
class Module;
class Constant;
struct LLVMContext;
class LLVMContext;
template<typename ValueSubClass, typename ItemParentClass>
class SymbolTableListTraits;

View File

@ -23,7 +23,7 @@
namespace llvm {
struct LLVMContext;
class LLVMContext;
//===----------------------------------------------------------------------===//
// TerminatorInst Class

View File

@ -20,7 +20,7 @@
namespace llvm {
struct LLVMContext;
class LLVMContext;
template<typename ValueSubClass, typename ItemParentClass>
class SymbolTableListTraits;

View File

@ -29,7 +29,7 @@ namespace llvm {
class ConstantInt;
class ConstantRange;
class APInt;
struct LLVMContext;
class LLVMContext;
//===----------------------------------------------------------------------===//
// AllocationInst Class

View File

@ -23,7 +23,7 @@ namespace llvm {
class Type;
class FunctionType;
class Function;
struct LLVMContext;
class LLVMContext;
class Module;
class AttrListPtr;

View File

@ -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();

View 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

View 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

View 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> {

View File

@ -21,7 +21,7 @@
namespace llvm {
struct LLVMContext;
class LLVMContext;
/// ConstantFolder - Create constants with minimum, target independent, folding.
class ConstantFolder {

View File

@ -28,7 +28,7 @@
namespace llvm {
struct LLVMContext;
class LLVMContext;
/// NoFolder - Create "constants" (actually, values) with no folding.
class NoFolder {

View File

@ -25,7 +25,7 @@
namespace llvm {
class TargetData;
struct LLVMContext;
class LLVMContext;
/// TargetFolder - Create constants with target dependent folding.
class TargetFolder {

View 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
///

View File

@ -27,7 +27,7 @@ class PHINode;
class AllocaInst;
class ConstantExpr;
class TargetData;
struct LLVMContext;
class LLVMContext;
struct DbgInfoIntrinsic;
template<typename T> class SmallVectorImpl;

View 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...

View 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);

View File

@ -42,7 +42,7 @@ typedef StringMapEntry<Value*> ValueName;
class raw_ostream;
class AssemblyAnnotationWriter;
class ValueHandleBase;
struct LLVMContext;
class LLVMContext;
//===----------------------------------------------------------------------===//
// Value Class

View File

@ -31,7 +31,7 @@
namespace llvm {
struct LLVMContext;
class LLVMContext;
/// The ArchiveMemberHeader structure is used internally for bitcode
/// archives.

View File

@ -24,7 +24,7 @@ namespace llvm {
class MemoryBuffer;
class Type;
class SMDiagnostic;
struct LLVMContext;
class LLVMContext;
class LLLexer {
const char *CurPtr;

View File

@ -26,7 +26,7 @@
namespace llvm {
class MemoryBuffer;
struct LLVMContext;
class LLVMContext;
//===----------------------------------------------------------------------===//
// BitcodeReaderValueList Class

View 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(

View File

@ -8,7 +8,7 @@
//===----------------------------------------------------------------------===//
//
// This file implements LLVMContext, as a wrapper around the opaque
// struct LLVMContextImpl.
// class LLVMContextImpl.
//
//===----------------------------------------------------------------------===//

View 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*,

View File

@ -30,7 +30,7 @@ class Function;
class BasicBlock;
class AbstractInterpreter;
class Instruction;
struct LLVMContext;
class LLVMContext;
class DebugCrashes;

View 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.