class DeclContextTree

Declaration

class DeclContextTree { /* full declaration omitted */ };

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.

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerDeclContext.h:127

Member Variables

private llvm::BumpPtrAllocator Allocator
private llvm::DeclContext Root
private DeclContext::Map Contexts
private llvm::DeclContextTree::ResolvedPathsMap ResolvedPaths
private llvm::CachedPathResolver PathResolver
Helper that resolves and caches fragments of file paths.
private llvm::NonRelocatableStringpool StringPool
String pool keeping real path bodies.

Method Overview

  • public PointerIntPair<llvm::DeclContext *, 1> getChildDeclContext(llvm::DeclContext & Context, const llvm::DWARFDie & DIE, llvm::CompileUnit & Unit, bool InClangModule)
  • private llvm::StringRef getResolvedPath(llvm::CompileUnit & CU, unsigned int FileNum, const DWARFDebugLine::LineTable & LineTable)
  • public llvm::DeclContext & getRoot()

Methods

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

Description

Get the child of \a Context described by \a DIE in \a Unit. The required strings will be interned in \a StringPool. 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.

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerDeclContext.h:140

Parameters

llvm::DeclContext& Context
const llvm::DWARFDie& DIE
llvm::CompileUnit& Unit
bool InClangModule

Returns

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

llvm::StringRef getResolvedPath(
    llvm::CompileUnit& CU,
    unsigned int FileNum,
    const DWARFDebugLine::LineTable& LineTable)

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerDeclContext.h:163

Parameters

llvm::CompileUnit& CU
unsigned int FileNum
const DWARFDebugLine::LineTable& LineTable

llvm::DeclContext& getRoot()

Declared at: llvm/include/llvm/DWARFLinker/DWARFLinkerDeclContext.h:145