Skip to content
Commit 62b27f89 authored by Felipe de Azevedo Piovezan's avatar Felipe de Azevedo Piovezan
Browse files

[CodeExtractor] Correctly propagate scope information post extraction

When a new function "NewF" is created with instructions extracted from
another function "OldF", the CodeExtractor only preserves debug
line/column of the extracted instructions. However:

1. Any inlinedAt nodes are dropped.
2. The scope chain is replaced with a single node, the Subprogram of NewF.

Both of these are incorrect: most of the debug metadata from the
original instructions should be preserved. We only need to update the
Subprogram found at the scope of the last node of the inline chain; this
Subprogram used to be OldF but now should be NewF.

Differential Revision: https://reviews.llvm.org/D139217
parent 8482e95f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment