[#llvm-DILocalScope] = xref:llvm.adoc[llvm]::DILocalScope :relfileprefix: ../ :mrdocs: A scope for locals. == Synopsis Declared in `<llvm/IR/DebugInfoMetadata.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- class DILocalScope : public xref:llvm/DIScope.adoc[DIScope] ---- == Description A legal scope for lexical blocks, local variables, and debug info locations. Subclasses are _DISubprogram,_ _DILexicalBlock,_ and _DILexicalBlockFile._ == Base Classes [cols="1,4"] |=== | Name| Description | `xref:llvm/DIScope.adoc[DIScope]` | Base class for scope‐like contexts. |=== == Type Aliases [cols="1,4"] |=== | Name| Description | xref:llvm/MDNode/op_iterator.adoc[`op_iterator`] | Iterator over this node's operands. | xref:llvm/MDNode/op_range.adoc[`op_range`] | Range of this node's operands. |=== == Enums [cols="1,4"] |=== | Name| Description | xref:llvm/DINode/DIFlags.adoc[`DIFlags`] | Debug info flags. | xref:llvm/Metadata/MetadataKind.adoc[`MetadataKind`] | RTTI identifiers for concrete metadata subclasses. |=== == Member Functions [cols="1,4"] |=== | Name| Description | xref:llvm/MDNode/operator_assign.adoc[`operator=`] [.small]#[deleted]# | Copy assignment is deleted; MDNode is non‐copyable. | xref:llvm/MDNode/clone.adoc[`clone`] | Create a (temporary) clone of this. | xref:llvm/Metadata/dump-08.adoc[`dump`] | `dump` overloads | xref:llvm/MDNode/dumpTree-02.adoc[`dumpTree`] | `dumpTree` overloads | xref:llvm/MDNode/getContext.adoc[`getContext`] | Return the LLVM context that owns this node. | xref:llvm/DIScope/getDirectory.adoc[`getDirectory`] | Return the directory. | xref:llvm/DIScope/getFile.adoc[`getFile`] | Return the file. | xref:llvm/DIScope/getFilename.adoc[`getFilename`] | Return the filename. | xref:llvm/Metadata/getMetadataID.adoc[`getMetadataID`] | Return the metadata kind ID for this node. | xref:llvm/DIScope/getName.adoc[`getName`] | Return the name. | xref:llvm/DILocalScope/getNonLexicalBlockFileScope.adoc[`getNonLexicalBlockFileScope`] | Get the first non DILexicalBlockFile scope of this scope. | xref:llvm/MDNode/getNumOperands.adoc[`getNumOperands`] | Return number of MDNode operands. | xref:llvm/MDNode/getNumTemporaryUses.adoc[`getNumTemporaryUses`] | Return the number of uses of this temporary metadata node. | xref:llvm/MDNode/getOperand.adoc[`getOperand`] | Return the operand at index `I.` | xref:llvm/DIScope/getRawFile.adoc[`getRawFile`] | Return the raw underlying file. | xref:llvm/DIScope/getScope.adoc[`getScope`] | Return the scope. | xref:llvm/DIScope/getSource.adoc[`getSource`] | Return the source. | xref:llvm/DILocalScope/getSubprogram.adoc[`getSubprogram`] | Get the subprogram for this scope. | xref:llvm/DINode/getTag.adoc[`getTag`] | Return the tag. | xref:llvm/MDNode/isAlwaysReplaceable.adoc[`isAlwaysReplaceable`] | Return true if this node kind is always RAUW‐replaceable (e.g. DIAssignID). | xref:llvm/MDNode/isDistinct.adoc[`isDistinct`] | Return true if this node is distinct (not uniqued). | xref:llvm/MDNode/isReplaceable.adoc[`isReplaceable`] | Return true if this node supports RAUW replacement. | xref:llvm/MDNode/isResolved.adoc[`isResolved`] | Check if node is fully resolved. | xref:llvm/MDNode/isTBAAVtableAccess.adoc[`isTBAAVtableAccess`] | Check whether MDNode is a vtable access. | xref:llvm/MDNode/isTemporary.adoc[`isTemporary`] | Return true if this is a temporary (forward‐declaration) metadata node. | xref:llvm/MDNode/isUniqued.adoc[`isUniqued`] | Return true if this node is uniqued in the context. | xref:llvm/MDNode/op_begin.adoc[`op_begin`] | Return an iterator to the first operand. | xref:llvm/MDNode/op_end.adoc[`op_end`] | Return an iterator past the last operand. | xref:llvm/MDNode/operands.adoc[`operands`] | Return this node's operands as an array reference. | xref:llvm/MDNode/operator_new-09.adoc[`operator new`] [.small]#[deleted]# | Ordinary allocation is deleted; use the custom MDNode allocators. | xref:llvm/Metadata/print-0c.adoc[`print`] | `print` overloads | xref:llvm/Metadata/printAsOperand-09e.adoc[`printAsOperand`] | `printAsOperand` overloads | xref:llvm/MDNode/printTree-08.adoc[`printTree`] | `printTree` overloads | xref:llvm/MDNode/replaceAllUsesWith.adoc[`replaceAllUsesWith`] | RAUW a temporary. | xref:llvm/MDNode/replaceOperandWith.adoc[`replaceOperandWith`] | Replace a specific operand. | xref:llvm/MDNode/resolve.adoc[`resolve`] | Resolve a unique, unresolved node. | xref:llvm/MDNode/resolveCycles.adoc[`resolveCycles`] | Resolve cycles. |=== == Static Member Functions [cols="1,4"] |=== | Name| Description | xref:llvm/DILocalScope/classof.adoc[`classof`] | Check whether `MD` is this kind of metadata. | xref:llvm/DILocalScope/cloneScopeForSubprogram.adoc[`cloneScopeForSubprogram`] | Traverses the scope chain rooted at RootScope until it hits a Subprogram, recreating the chain with "NewSP" instead. | xref:llvm/MDNode/concatenate.adoc[`concatenate`] | Methods for metadata merging. Concatenate metadata nodes `A` and `B.` | xref:llvm/MDNode/deleteTemporary.adoc[`deleteTemporary`] | Deallocate a node created by getTemporary. | xref:llvm/MDNode/fromCaptureComponents.adoc[`fromCaptureComponents`] | Convert CaptureComponents to !captures metadata. The return value may be nullptr. | xref:llvm/MDNode/get.adoc[`get`] | Return a uniqued tuple metadata node with operands `MDs.` | xref:llvm/MDNode/getDistinct.adoc[`getDistinct`] | Return a distinct (non‐uniqued) tuple with operands `MDs.` | xref:llvm/DINode/getFlag.adoc[`getFlag`] | Return the flag. | xref:llvm/DINode/getFlagString.adoc[`getFlagString`] | Return the flag string. | xref:llvm/MDNode/getIfExists.adoc[`getIfExists`] | Return an existing uniqued tuple for `MDs,` or null if none. | xref:llvm/MDNode/getMergedAllocTokenMetadata.adoc[`getMergedAllocTokenMetadata`] | Merge alloc‐token metadata from two instructions. | xref:llvm/MDNode/getMergedCalleeTypeMetadata.adoc[`getMergedCalleeTypeMetadata`] | Merge callee‐type metadata from two instructions. | xref:llvm/MDNode/getMergedCallsiteMetadata.adoc[`getMergedCallsiteMetadata`] | Merge callsite metadata from two instructions. | xref:llvm/MDNode/getMergedMemProfMetadata.adoc[`getMergedMemProfMetadata`] | Merge memprof metadata from two instructions. | xref:llvm/MDNode/getMergedProfMetadata.adoc[`getMergedProfMetadata`] | Merge !prof metadata from two instructions. Currently only implemented with direct callsites with branch weights. | xref:llvm/MDNode/getMostGenericAliasScope.adoc[`getMostGenericAliasScope`] | Merge alias‐scope metadata, keeping scopes present in both. | xref:llvm/MDNode/getMostGenericAlignmentOrDereferenceable.adoc[`getMostGenericAlignmentOrDereferenceable`] | Merge align/dereferenceable metadata, returning the most generic bound. | xref:llvm/MDNode/getMostGenericFPMath.adoc[`getMostGenericFPMath`] | Merge FP‐math metadata, returning the most generic accuracy. | xref:llvm/MDNode/getMostGenericNoFPClass.adoc[`getMostGenericNoFPClass`] | Merge `!nofpclass` metadata by intersecting the allowed FP classes. | xref:llvm/MDNode/getMostGenericNoaliasAddrspace.adoc[`getMostGenericNoaliasAddrspace`] | Merge noalias address‐space metadata, returning the most generic set. | xref:llvm/MDNode/getMostGenericRange.adoc[`getMostGenericRange`] | Merge !range metadata by taking the union of the integer intervals. | xref:llvm/MDNode/getMostGenericTBAA.adoc[`getMostGenericTBAA`] | Merge TBAA metadata, returning the most generic common tag. | xref:llvm/MDNode/getTemporary.adoc[`getTemporary`] | Return a temporary tuple with operands `MDs.` | xref:llvm/MDNode/intersect.adoc[`intersect`] | Intersect metadata nodes `A` and `B.` | xref:llvm/MDNode/replaceWithDistinct.adoc[`replaceWithDistinct`] | Replace a temporary node with a distinct one. | xref:llvm/MDNode/replaceWithPermanent.adoc[`replaceWithPermanent`] | Replace a temporary node with a permanent one. | xref:llvm/MDNode/replaceWithUniqued.adoc[`replaceWithUniqued`] | Replace a temporary node with a uniqued one. | xref:llvm/DINode/splitFlags.adoc[`splitFlags`] | Split up a flags bitfield. | xref:llvm/MDNode/toCaptureComponents.adoc[`toCaptureComponents`] | Convert !captures metadata to CaptureComponents. MD may be nullptr. |=== == Static Data Members [cols="1,4"] |=== | Name| Description | xref:llvm/Metadata/PoisonGeneratingIDs.adoc[`PoisonGeneratingIDs`] | Metadata IDs that may generate poison. |=== == Protected Type Aliases [cols="1,4"] |=== | Name| Description | xref:llvm/MDNode/mutable_op_range.adoc[`mutable_op_range`] | Range type over mutable `MDOperand` elements. |=== == Protected Enums [cols="1,4"] |=== | Name| Description | xref:llvm/Metadata/StorageType.adoc[`StorageType`] | Active type of storage. |=== == Protected Member Functions [cols="1,4"] |=== | Name| Description | xref:llvm/DILocalScope/2constructor.adoc[`DILocalScope`] [.small]#[constructor]# | Construct a DILocalScope. | xref:llvm/DILocalScope/2destructor.adoc[`~DILocalScope`] [.small]#[destructor]# | Destroy this DILocalScope. | xref:llvm/MDNode/dropAllReferences.adoc[`dropAllReferences`] | Drop all references held by this metadata node. | xref:llvm/MDNode/getNumUnresolved.adoc[`getNumUnresolved`] | Return the number of unresolved operands in this node. | xref:llvm/DINode/getOperandAs.adoc[`getOperandAs`] | Return the operand as. | xref:llvm/DINode/getStringOperand.adoc[`getStringOperand`] | Return the string operand. | xref:llvm/Metadata/handleChangedOperand.adoc[`handleChangedOperand`] | Default handling of a changed operand, which asserts. | xref:llvm/MDNode/mutable_begin.adoc[`mutable_begin`] | Return an iterator to the first mutable operand. | xref:llvm/MDNode/mutable_end.adoc[`mutable_end`] | Return an iterator past the last mutable operand. | xref:llvm/MDNode/mutable_operands.adoc[`mutable_operands`] | Return a mutable range over this node's operands. | xref:llvm/MDNode/operator_del-03b.adoc[`operator delete`] | Delete operators | xref:llvm/MDNode/operator_new-01.adoc[`operator new`] | Allocate an `MDNode` with `NumOps` operand slots and `Storage` kind. | xref:llvm/MDNode/resize.adoc[`resize`] | Resize the node to hold _NumOps_ operands. | xref:llvm/MDNode/setNumUnresolved.adoc[`setNumUnresolved`] | Set the number of unresolved operands in this node. | xref:llvm/MDNode/setOperand.adoc[`setOperand`] | Set an operand. | xref:llvm/DINode/setTag.adoc[`setTag`] | Allow subclasses to mutate the tag. | xref:llvm/MDNode/storeDistinctInContext.adoc[`storeDistinctInContext`] | Register this node as a distinct MDNode owned by the LLVMContext. |=== == Protected Static Member Functions [cols="1,4"] |=== | Name| Description | xref:llvm/DINode/getCanonicalMDString.adoc[`getCanonicalMDString`] | Return the canonical md string. | xref:llvm/MDNode/storeImpl-00.adoc[`storeImpl`] | `storeImpl` overloads |=== == Protected Data Members [cols="1,4"] |=== | Name| Description | xref:llvm/Metadata/Storage.adoc[`Storage`] | Storage flag for non‐uniqued, otherwise unowned, metadata. | xref:llvm/Metadata/SubclassData1.adoc[`SubclassData1`] | One bit of subclass‐specific state packed into the metadata header. | xref:llvm/Metadata/SubclassData16.adoc[`SubclassData16`] | Sixteen bits of subclass‐specific state packed into the metadata header. | xref:llvm/Metadata/SubclassData32.adoc[`SubclassData32`] | Thirty‐two bits of subclass‐specific state packed into the metadata header. |=== == Non-Member Functions [cols="1,4"] |=== | Name| Description | xref:llvm/GetUnrollMetadata.adoc[`GetUnrollMetadata`] | Return the named unroll hint metadata operand from loop id `LoopID.` | xref:llvm/MapMetadata-00.adoc[`MapMetadata`] | Lookup or compute a mapping for a piece of metadata. | xref:llvm/MapMetadata-0c.adoc[`MapMetadata`] | Version of MapMetadata with type safety for MDNode. | xref:llvm/UpgradeTBAANode.adoc[`UpgradeTBAANode`] | Upgrade a scalar TBAA tag to the struct‐path aware TBAA format. | xref:llvm/computeKnownBitsFromRangeMetadata.adoc[`computeKnownBitsFromRangeMetadata`] | Compute known bits from the range metadata. `KnownZero` the set of bits that are known to be zero `KnownOne` the set of bits that are known to be one | xref:llvm/extractBranchWeights-01.adoc[`extractBranchWeights`] | Extract branch weights from MD_prof metadata | xref:llvm/extractFromBranchWeightMD32.adoc[`extractFromBranchWeightMD32`] | Faster version of extractBranchWeights() that skips checks and must only be called with "branch_weights" metadata nodes. Supports uint32_t. | xref:llvm/extractFromBranchWeightMD64.adoc[`extractFromBranchWeightMD64`] | Faster version of extractBranchWeights() that skips checks and must only be called with "branch_weights" metadata nodes. Supports uint64_t. | xref:llvm/extractProfTotalWeight-0b.adoc[`extractProfTotalWeight`] | Retrieve the total of all weights from MD_prof data. | xref:llvm/findOptionMDForLoopID.adoc[`findOptionMDForLoopID`] | Find and return the loop attribute node for the attribute `Name` in `LoopID.` Return nullptr if there is no such attribute. | xref:llvm/getBranchWeightOffset.adoc[`getBranchWeightOffset`] | Return the offset to the first branch weight data | xref:llvm/getConstantRangeFromMetadata.adoc[`getConstantRangeFromMetadata`] | Parse out a conservative ConstantRange from !range metadata. | xref:llvm/getDISubprogram.adoc[`getDISubprogram`] | Find subprogram that is enclosing this scope. | xref:llvm/getNumBranchWeights.adoc[`getNumBranchWeights`] | Return the number of branch weights stored in `ProfileData` | xref:llvm/hasBranchWeightOrigin-08.adoc[`hasBranchWeightOrigin`] | Check if Branch Weight Metadata has an "expected" field from an llvm.expect* intrinsic | xref:llvm/isBranchWeightMD.adoc[`isBranchWeightMD`] | Checks if an MDNode contains Branch Weight Metadata | xref:llvm/isExplicitlyUnknownProfileMetadata.adoc[`isExplicitlyUnknownProfileMetadata`] | Check whether `MD` is explicitly‐unknown profile metadata. | xref:llvm/isValidAsAccessGroup.adoc[`isValidAsAccessGroup`] | Return whether an MDNode might represent an access group. | xref:llvm/isValueProfileMD.adoc[`isValueProfileMD`] | Checks if an MDNode contains value profiling Metadata | xref:llvm/makeFollowupLoopID.adoc[`makeFollowupLoopID`] | Create a new loop identifier for a loop created from a loop transformation. | xref:llvm/uniteAccessGroups.adoc[`uniteAccessGroups`] | Compute the union of two access‐group lists. | xref:llvm/upgradeInstructionLoopAttachment.adoc[`upgradeInstructionLoopAttachment`] | Upgrade the loop attachment metadata node. | xref:llvm/wrap-057.adoc[`wrap`] | Wrap a `Metadata` pointer as an opaque `LLVMMetadataRef.` | xref:llvm/memprof/getMIBAllocType.adoc[`memprof::getMIBAllocType`] | Returns the allocation type from an MIB metadata node. | xref:llvm/memprof/getMIBStackNode.adoc[`memprof::getMIBStackNode`] | Returns the stack node from an MIB metadata node. |=== == Derived Classes [cols="1,4"] |=== | Name| Description | xref:llvm/DILexicalBlockBase.adoc[`DILexicalBlockBase`] | Base class for lexical‐block scopes. | xref:llvm/DISubprogram.adoc[`DISubprogram`] | Subprogram description. Uses SubclassData1. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#