llvm::DebugLoc::replaceInlinedAtSubprogram

Rebuild the entire inline-at chain by replacing the subprogram at the end of the chain with NewSP.

Synopsis

Declared in <llvm/IR/DebugLoc.h>

static
DebugLoc
replaceInlinedAtSubprogram(
    DebugLoc const& DL,
    DISubprogram& NewSP,
    LLVMContext& Ctx,
    DenseMap<MDNode const*, MDNode*>& Cache);

Return Value

A DebugLoc whose inlined-at chain ends at NewSP.

Parameters

NameDescription
DLThe original debug location whose inlined-at chain is rebuilt.
NewSPThe subprogram that replaces the one at the end of the chain.
CtxThe LLVM context used to create new DILocation nodes.
CacheMap reused to avoid recreating identical DILocation nodes.