llvm/llvm/lib/IR/LLVMContextImpl.h

//===- LLVMContextImpl.h - The LLVMContextImpl opaque class -----*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
//  This file declares LLVMContextImpl, the opaque implementation
//  of LLVMContext.
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_LIB_IR_LLVMCONTEXTIMPL_H
#define LLVM_LIB_IR_LLVMCONTEXTIMPL_H

#include "ConstantsContext.h"
#include "llvm/ADT/APFloat.h"
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/DenseMapInfo.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/FoldingSet.h"
#include "llvm/ADT/Hashing.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/BinaryFormat/Dwarf.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DebugInfoMetadata.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Metadata.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/TrackingMDRef.h"
#include "llvm/IR/Type.h"
#include "llvm/IR/Value.h"
#include "llvm/Support/Allocator.h"
#include "llvm/Support/Casting.h"
#include "llvm/Support/StringSaver.h"
#include <algorithm>
#include <cassert>
#include <cstddef>
#include <cstdint>
#include <memory>
#include <optional>
#include <string>
#include <utility>
#include <vector>

namespace llvm {

class AttributeImpl;
class AttributeListImpl;
class AttributeSetNode;
class BasicBlock;
class ConstantRangeAttributeImpl;
class ConstantRangeListAttributeImpl;
struct DiagnosticHandler;
class DbgMarker;
class ElementCount;
class Function;
class GlobalObject;
class GlobalValue;
class InlineAsm;
class LLVMRemarkStreamer;
class OptPassGate;
namespace remarks {
class RemarkStreamer;
}
template <typename T> class StringMapEntry;
class StringRef;
class TypedPointerType;
class ValueHandleBase;

template <> struct DenseMapInfo<APFloat> {};

struct AnonStructTypeKeyInfo {};

struct FunctionTypeKeyInfo {};

struct TargetExtTypeKeyInfo {};

/// Structure for hashing arbitrary MDNode operands.
class MDNodeOpsKey {};

template <class NodeTy> struct MDNodeKeyImpl;

/// Configuration point for MDNodeInfo::isEqual().
template <class NodeTy> struct MDNodeSubsetEqualImpl {};

/// DenseMapInfo for MDTuple.
///
/// Note that we don't need the is-function-local bit, since that's implicit in
/// the operands.
template <> struct MDNodeKeyImpl<MDTuple> : MDNodeOpsKey {};

/// DenseMapInfo for DILocation.
template <> struct MDNodeKeyImpl<DILocation> {};

/// DenseMapInfo for GenericDINode.
template <> struct MDNodeKeyImpl<GenericDINode> : MDNodeOpsKey {};

template <> struct MDNodeKeyImpl<DISubrange> {};

template <> struct MDNodeKeyImpl<DIGenericSubrange> {};

template <> struct MDNodeKeyImpl<DIEnumerator> {};

template <> struct MDNodeKeyImpl<DIBasicType> {};

template <> struct MDNodeKeyImpl<DIStringType> {};

template <> struct MDNodeKeyImpl<DIDerivedType> {};

template <> struct MDNodeSubsetEqualImpl<DIDerivedType> {};

template <> struct MDNodeKeyImpl<DICompositeType> {};

template <> struct MDNodeKeyImpl<DISubroutineType> {};

template <> struct MDNodeKeyImpl<DIFile> {};

template <> struct MDNodeKeyImpl<DISubprogram> {};

template <> struct MDNodeSubsetEqualImpl<DISubprogram> {};

template <> struct MDNodeKeyImpl<DILexicalBlock> {};

template <> struct MDNodeKeyImpl<DILexicalBlockFile> {};

template <> struct MDNodeKeyImpl<DINamespace> {};

template <> struct MDNodeKeyImpl<DICommonBlock> {};

template <> struct MDNodeKeyImpl<DIModule> {};

template <> struct MDNodeKeyImpl<DITemplateTypeParameter> {};

template <> struct MDNodeKeyImpl<DITemplateValueParameter> {};

template <> struct MDNodeKeyImpl<DIGlobalVariable> {};

template <> struct MDNodeKeyImpl<DILocalVariable> {};

template <> struct MDNodeKeyImpl<DILabel> {};

template <> struct MDNodeKeyImpl<DIExpression> {};

template <> struct MDNodeKeyImpl<DIGlobalVariableExpression> {};

template <> struct MDNodeKeyImpl<DIObjCProperty> {};

template <> struct MDNodeKeyImpl<DIImportedEntity> {};

template <> struct MDNodeKeyImpl<DIMacro> {};

template <> struct MDNodeKeyImpl<DIMacroFile> {};

// DIArgLists are not MDNodes, but we still want to unique them in a DenseSet
// based on a hash of their arguments.
struct DIArgListKeyInfo {};

/// DenseMapInfo for DIArgList.
struct DIArgListInfo {};

/// DenseMapInfo for MDNode subclasses.
template <class NodeTy> struct MDNodeInfo {};

#define HANDLE_MDNODE_LEAF
#include "llvm/IR/Metadata.def"

/// Multimap-like storage for metadata attachments.
class MDAttachments {};

class LLVMContextImpl {};

} // end namespace llvm

#endif // LLVM_LIB_IR_LLVMCONTEXTIMPL_H