LLVM 20.0.0git
Public Member Functions | List of all members
llvm::dwarf_linker::classic::DeclContextTree Class Reference

This class gives a tree-like API to the DenseMap that stores the DeclContext objects. More...

#include "llvm/DWARFLinker/Classic/DWARFLinkerDeclContext.h"

Public Member Functions

PointerIntPair< DeclContext *, 1 > getChildDeclContext (DeclContext &Context, const DWARFDie &DIE, CompileUnit &Unit, bool InClangModule)
 Get the child of Context described by DIE in Unit.
 
DeclContextgetRoot ()
 

Detailed Description

This class gives a tree-like API to the DenseMap that stores the DeclContext objects.

It holds the BumpPtrAllocator where these objects will be allocated.

Definition at line 129 of file DWARFLinkerDeclContext.h.

Member Function Documentation

◆ getChildDeclContext()

PointerIntPair< DeclContext *, 1 > llvm::DeclContextTree::getChildDeclContext ( DeclContext Context,
const DWARFDie DIE,
CompileUnit Unit,
bool  InClangModule 
)

Get the child of Context described by DIE in Unit.

The required strings will be interned in StringPool.

Returns
The child DeclContext along with one bit that is set if this context is invalid.

An invalid context means it shouldn't be considered for uniquing, but its not returning null, because some children of that context might be uniquing candidates.

FIXME: The invalid bit along the return value is to emulate some dsymutil-classic functionality.

Definition at line 48 of file DWARFLinkerDeclContext.cpp.

References assert(), llvm::StringRef::empty(), llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::end(), llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::find(), llvm::dwarf_linker::classic::DeclContext::getQualifiedNameHash(), llvm::DIE::getTag(), llvm::dwarf_linker::classic::DeclContext::getTag(), llvm::hash_combine(), llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::insert(), llvm::LinkageName, llvm::ShortName, llvm::Tag, and llvm::dwarf::toUnsigned().

Referenced by llvm::analyzeContextInfo().

◆ getRoot()

DeclContext & llvm::dwarf_linker::classic::DeclContextTree::getRoot ( )
inline

The documentation for this class was generated from the following files: