mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[func-sig-opts] Add the call SILFunction::spliceBody() to splice a function's body onto another function.
I also added code to ilist_traits so we can set the parent function on BB to be the new function. Swift SVN r21729
This commit is contained in:
@@ -79,6 +79,10 @@ SILFunction::SILFunction(SILModule &Module, SILLinkage Linkage,
|
||||
Module.functions.insert(SILModule::iterator(InsertBefore), this);
|
||||
else
|
||||
Module.functions.push_back(this);
|
||||
|
||||
// Set our BB list to have this function as its parent. This enables us to
|
||||
// splice efficiently basic blocks in between functions.
|
||||
BlockList.Parent = this;
|
||||
}
|
||||
|
||||
SILFunction::~SILFunction() {
|
||||
|
||||
Reference in New Issue
Block a user