LLVM  14.0.0git
Public Member Functions | List of all members
llvm::DeclContextTree Class Reference

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

#include "llvm/DWARFLinker/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. More...
 
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 121 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 44 of file DWARFLinkerDeclContext.cpp.

References assert(), Context, llvm::StringRef::empty(), llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::end(), llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::find(), llvm::DWARFUnit::getContext(), llvm::DWARFContext::getLineTableForUnit(), llvm::CompileUnit::getOrigUnit(), llvm::DIE::getTag(), llvm::CompileUnit::getUniqueID(), llvm::hash_combine(), llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::insert(), llvm::NonRelocatableStringpool::internString(), llvm::LinkageName, LLVM_FALLTHROUGH, llvm::AArch64CC::LT, llvm::max(), llvm::ShortName, and llvm::dwarf::toUnsigned().

Referenced by llvm::analyzeContextInfo().

◆ getRoot()

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

Definition at line 139 of file DWARFLinkerDeclContext.h.

Referenced by llvm::DWARFLinker::link().


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