23 : TheTrueVal(nullptr), TheFalseVal(nullptr),
24 VoidTy(C,
Type::VoidTyID),
25 LabelTy(C,
Type::LabelTyID),
26 HalfTy(C,
Type::HalfTyID),
29 MetadataTy(C,
Type::MetadataTyID),
30 X86_FP80Ty(C,
Type::X86_FP80TyID),
31 FP128Ty(C,
Type::FP128TyID),
32 PPC_FP128Ty(C,
Type::PPC_FP128TyID),
33 X86_MMXTy(C,
Type::X86_MMXTyID),
51 struct DropReferences {
54 template <
typename PairT>
void operator()(
const PairT &
P) {
55 P.second->dropAllReferences();
63 template<
typename PairT>
64 void operator()(
const PairT &
P) {
65 P.first->dropAllReferences();
80 I->dropAllReferences();
81 #define HANDLE_MDNODE_LEAF(CLASS) \
82 for (auto *I : CLASS##s) \
83 I->dropAllReferences();
84 #include "llvm/IR/Metadata.def"
88 Pair.second->dropUsers();
90 Pair.second->dropUse();
93 for (
MDNode *
I : DistinctMDNodes)
94 I->deleteAsSubclass();
95 #define HANDLE_MDNODE_LEAF(CLASS) \
96 for (CLASS *I : CLASS##s) \
98 #include "llvm/IR/Metadata.def"
149 MDVs.
reserve(MetadataAsValues.size());
150 for (
auto &Pair : MetadataAsValues)
152 MetadataAsValues.clear();
158 for (
auto &Pair : ValuesAsMetadata)
174 if (
C->use_empty()) {
176 C->destroyConstant();
210 assert(Hash == RawHash &&
211 "Expected hash of MDOperand to equal hash of Metadata*");
222 void UnaryConstantExpr::anchor() { }
224 void BinaryConstantExpr::anchor() { }
226 void SelectConstantExpr::anchor() { }
228 void ExtractElementConstantExpr::anchor() { }
230 void InsertElementConstantExpr::anchor() { }
232 void ShuffleVectorConstantExpr::anchor() { }
234 void ExtractValueConstantExpr::anchor() { }
236 void InsertValueConstantExpr::anchor() { }
238 void GetElementPtrConstantExpr::anchor() { }
240 void CompareConstantExpr::anchor() { }
static unsigned calculateHash(MDNode *N, unsigned Offset=0)
void DeleteContainerSeconds(Container &C)
In a container of pairs (usually a map) whose second element is a pointer, deletes the second element...
void push_back(const T &Elt)
Tracking metadata reference owned by Metadata.
FoldingSet< AttributeImpl > AttrsSet
bool LLVM_ATTRIBUTE_UNUSED_RESULT empty() const
DenseMap< Value *, ValueAsMetadata * > ValuesAsMetadata
bool RespectDiagnosticFilters
op_iterator op_begin() const
static const Metadata * get_hashable_data(const MDOperand &X)
Make MDOperand transparent for hashing.
LLVMContext::InlineAsmDiagHandlerTy InlineAsmDiagHandler
void reserve(size_type N)
void dropTriviallyDeadConstantArrays()
Destroy the ConstantArrays if they are not used.
op_iterator op_end() const
FoldingSet< AttributeSetImpl > AttrsLists
This file contains the simple types necessary to represent the attributes associated with functions a...
ConstantUniqueMap< InlineAsm > InlineAsms
unsigned NamedStructTypesUniqueID
LLVMContextImpl(LLVMContext &C)
const Type::TypeID FloatTyID
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
ArrayConstantsTy ArrayConstants
DenseMap< PointerType *, ConstantPointerNull * > CPNConstants
MapTy::iterator map_begin()
LLVMContext::YieldCallbackTy YieldCallback
DenseMap< Type *, ConstantAggregateZero * > CAZConstants
The instances of the Type class are immutable: once they are created, they are never changed...
This is an important class for using LLVM in a threaded context.
static GCMetadataPrinterRegistry::Add< ErlangGCPrinter > X("erlang","erlang-compatible garbage collector")
SmallPtrSet< MDNode *, 1 > DistinctMDNodes
void * InlineAsmDiagContext
VectorConstantsTy VectorConstants
LLVMContextImpl *const pImpl
DenseMap< Metadata *, MetadataAsValue * > MetadataAsValues
void dropTriviallyDeadConstantArrays()
Destroy ConstantArrays in LLVMContext if they are not used.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
Module.h This file contains the declarations for the Module class.
SmallPtrSet< Module *, 4 > OwnedModules
OwnedModules - The set of modules instantiated in this context, and which will be automatically delet...
hash_code hash_combine_range(InputIteratorT first, InputIteratorT last)
Compute a hash_code for a sequence of values.
DenseMap< Type *, UndefValue * > UVConstants
StringMap< MDString > MDStringCache
ConstantUniqueMap< ConstantExpr > ExprConstants
const Type::TypeID DoubleTyID
StructConstantsTy StructConstants
MapTy::iterator map_end()
FoldingSet< AttributeSetNode > AttrsSetNodes
LLVMContext::DiagnosticHandlerTy DiagnosticHandler
C - The default llvm calling convention, compatible with C.
StringMap< ConstantDataSequential * > CDSConstants