Traverses the scope chain rooted at RootScope until it hits a Subprogram, recreating the chain with "NewSP" instead.
Declared in <llvm/IR/DebugInfoMetadata.h>
static
DILocalScope*
cloneScopeForSubprogram(
DILocalScope& RootScope,
DISubprogram& NewSP,
LLVMContext& Ctx,
DenseMap<MDNode const*, MDNode*>& Cache);
traverses the scope chain rooted at RootScope until it hits a Subprogram,.
| Name | Description |
|---|---|
| RootScope | Root local scope to clone. |
| NewSP | Subprogram that owns the cloned scope chain. |
| Ctx | LLVM context for newly created scope nodes. |
| Cache | Map from old scopes to already-cloned scopes. |