[#llvm-MDBuilder] = xref:llvm.adoc[llvm]::MDBuilder :relfileprefix: ../ :mrdocs: Builder for creating LLVM metadata with a consistent interface. == Synopsis Declared in `<llvm/IR/MDBuilder.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class MDBuilder; ---- == Types [cols="1,4"] |=== | Name| Description | xref:llvm/MDBuilder/TBAAStructField.adoc[`TBAAStructField`] | Description of a field in a TBAA struct type. |=== == Type Aliases [cols="1,4"] |=== | Name| Description | xref:llvm/MDBuilder/PCSection.adoc[`PCSection`] | A pair of PC section name with auxilliary constant data. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:llvm/MDBuilder/2constructor.adoc[`MDBuilder`] [.small]#[constructor]# | Construct a metadata builder for the given context. | xref:llvm/MDBuilder/createAliasScope.adoc[`createAliasScope`] | Return metadata appropriate for an alias scope node with the given name. This may be identified (uniqued) with other scopes with the same name and domain. | xref:llvm/MDBuilder/createAliasScopeDomain.adoc[`createAliasScopeDomain`] | Return metadata appropriate for an alias scope domain node with the given name. This may be identified (uniqued) with other roots with the same name. | xref:llvm/MDBuilder/createAnonymousAliasScope.adoc[`createAnonymousAliasScope`] | Return metadata for an anonymous alias scope node. | xref:llvm/MDBuilder/createAnonymousAliasScopeDomain.adoc[`createAnonymousAliasScopeDomain`] | Return metadata for an anonymous alias scope domain node. | xref:llvm/MDBuilder/createAnonymousTBAARoot.adoc[`createAnonymousTBAARoot`] | Return metadata for an anonymous TBAA root node. | xref:llvm/MDBuilder/createBranchWeights-0d.adoc[`createBranchWeights`] | `createBranchWeights` overloads | xref:llvm/MDBuilder/createCallbackEncoding.adoc[`createCallbackEncoding`] | Return metadata describing a callback (see llvm::AbstractCallSite). | xref:llvm/MDBuilder/createCallees.adoc[`createCallees`] | Return metadata indicating the possible callees of indirect calls. | xref:llvm/MDBuilder/createConstant.adoc[`createConstant`] | Return the given constant as metadata. | xref:llvm/MDBuilder/createFPMath.adoc[`createFPMath`] | Return metadata with the given settings. | xref:llvm/MDBuilder/createFunctionEntryCount.adoc[`createFunctionEntryCount`] | Return metadata for a function entry count and related PGO data. | xref:llvm/MDBuilder/createGlobalObjectSectionPrefix.adoc[`createGlobalObjectSectionPrefix`] | Return metadata containing the section prefix for a global object. | xref:llvm/MDBuilder/createIrrLoopHeaderWeight.adoc[`createIrrLoopHeaderWeight`] | Return metadata containing an irreducible loop header weight. | xref:llvm/MDBuilder/createLLVMStats.adoc[`createLLVMStats`] | Return metadata containing llvm statistics. | xref:llvm/MDBuilder/createLikelyBranchWeights.adoc[`createLikelyBranchWeights`] | Return metadata containing two branch weights, with significant bias towards `true` destination. | xref:llvm/MDBuilder/createMutableTBAAAccessTag.adoc[`createMutableTBAAAccessTag`] | Return mutable version of the given mutable or immutable TBAA access tag. | xref:llvm/MDBuilder/createPCSections.adoc[`createPCSections`] | Return metadata for PC sections. | xref:llvm/MDBuilder/createPseudoProbeDesc.adoc[`createPseudoProbeDesc`] | Return metadata containing the pseudo probe descriptor for a function. | xref:llvm/MDBuilder/createRTTIPointerPrologue.adoc[`createRTTIPointerPrologue`] | Return metadata feeding to the CodeGen about how to generate a function prologue for the "function" santizier. | xref:llvm/MDBuilder/createRange-05.adoc[`createRange`] | Return metadata describing the range [Lo, Hi).] | xref:llvm/MDBuilder/createString.adoc[`createString`] | Return the given string as metadata. | xref:llvm/MDBuilder/createTBAAAccessTag.adoc[`createTBAAAccessTag`] | Return metadata for a TBAA access tag. | xref:llvm/MDBuilder/createTBAANode.adoc[`createTBAANode`] | Return metadata for a non‐root TBAA node with the given name, parent in the TBAA tree, and value for 'pointsToConstantMemory'. | xref:llvm/MDBuilder/createTBAARoot.adoc[`createTBAARoot`] | Return metadata appropriate for a TBAA root node with the given name. This may be identified (uniqued) with other roots with the same name. | xref:llvm/MDBuilder/createTBAAScalarTypeNode.adoc[`createTBAAScalarTypeNode`] | Return metadata for a TBAA scalar type node with the given name, an offset and a parent in the TBAA type DAG. | xref:llvm/MDBuilder/createTBAAStructNode.adoc[`createTBAAStructNode`] | Return metadata for a tbaa.struct node with the given struct field descriptions. | xref:llvm/MDBuilder/createTBAAStructTagNode.adoc[`createTBAAStructTagNode`] | Return metadata for a TBAA tag node with the given base type, access type and offset relative to the base type. | xref:llvm/MDBuilder/createTBAAStructTypeNode.adoc[`createTBAAStructTypeNode`] | Return metadata for a TBAA struct node in the type DAG with the given name, a list of pairs (offset, field type in the type DAG). | xref:llvm/MDBuilder/createTBAATypeNode.adoc[`createTBAATypeNode`] | Return metadata for a TBAA type node in the TBAA type DAG with the given parent type, size in bytes, type identifier and a list of fields. | xref:llvm/MDBuilder/createUnlikelyBranchWeights.adoc[`createUnlikelyBranchWeights`] | Return metadata containing two branch weights, with significant bias towards `false` destination. | xref:llvm/MDBuilder/createUnpredictable.adoc[`createUnpredictable`] | Return metadata specifying that a branch or switch is unpredictable. | xref:llvm/MDBuilder/mergeCallbackEncodings.adoc[`mergeCallbackEncodings`] | Merge the new callback encoding `NewCB` into `ExistingCallbacks.` |=== == Static Data Members [cols="1,4"] |=== | Name| Description | xref:llvm/MDBuilder/kLikelyBranchWeight.adoc[`kLikelyBranchWeight`] | The weight for a branch taken with high probability. | xref:llvm/MDBuilder/kUnlikelyBranchWeight.adoc[`kUnlikelyBranchWeight`] | The weight for a branch taken with low probability. |=== == Protected Member Functions [cols="1,4"] |=== | Name| Description | xref:llvm/MDBuilder/createAnonymousAARoot.adoc[`createAnonymousAARoot`] | Return metadata for an anonymous AA root node (scope or TBAA). |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#