mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-15 23:31:37 +00:00
Use new method
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8573 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0981b62eec
commit
79f03d350e
@ -54,13 +54,8 @@ std::string getPassesString(const std::vector<const PassInfo*> &Passes) {
|
|||||||
// blocks, making it external.
|
// blocks, making it external.
|
||||||
//
|
//
|
||||||
void DeleteFunctionBody(Function *F) {
|
void DeleteFunctionBody(Function *F) {
|
||||||
// First, break circular use/def chain references...
|
// delete the body of the function...
|
||||||
for (Function::iterator I = F->begin(), E = F->end(); I != E; ++I)
|
F->deleteBody();
|
||||||
I->dropAllReferences();
|
|
||||||
|
|
||||||
// Next, delete all of the basic blocks.
|
|
||||||
F->getBasicBlockList().clear();
|
|
||||||
F->setLinkage(GlobalValue::ExternalLinkage);
|
|
||||||
assert(F->isExternal() && "This didn't make the function external!");
|
assert(F->isExternal() && "This didn't make the function external!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user