mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[func-sig-opts] When splicing BB from one function to another, change
the debug scope of each instruction to be the debug scope of the new function. This will be tested by the functionality in function signature opts. Swift SVN r22553
This commit is contained in:
@@ -116,6 +116,10 @@ transferNodesFromList(llvm::ilist_traits<SILBasicBlock> &SrcTraits,
|
||||
if (Parent == SrcTraits.Parent) return;
|
||||
|
||||
// If splicing blocks not in the same function, update the parent pointers.
|
||||
for (; First != Last; ++First)
|
||||
for (; First != Last; ++First) {
|
||||
First->Parent = Parent;
|
||||
for (auto &II : *First) {
|
||||
II.setDebugScope(Parent->getDebugScope());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user