mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-16 14:31:59 +00:00
Make sure the extracted function has external linkage, so that it doesn't
get eliminated by globaldce! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2736 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1ab854aa1e
commit
6a1359229d
@ -39,6 +39,9 @@ struct FunctionExtractorPass : public Pass {
|
|||||||
// Yes, it is. Keep track of it...
|
// Yes, it is. Keep track of it...
|
||||||
Named = *I;
|
Named = *I;
|
||||||
|
|
||||||
|
// Make sure it's globally accessable...
|
||||||
|
Named->setInternalLinkage(false);
|
||||||
|
|
||||||
// Remove the named function from the module.
|
// Remove the named function from the module.
|
||||||
M->getFunctionList().remove(I);
|
M->getFunctionList().remove(I);
|
||||||
E = M->end();
|
E = M->end();
|
||||||
|
@ -39,6 +39,9 @@ struct FunctionExtractorPass : public Pass {
|
|||||||
// Yes, it is. Keep track of it...
|
// Yes, it is. Keep track of it...
|
||||||
Named = *I;
|
Named = *I;
|
||||||
|
|
||||||
|
// Make sure it's globally accessable...
|
||||||
|
Named->setInternalLinkage(false);
|
||||||
|
|
||||||
// Remove the named function from the module.
|
// Remove the named function from the module.
|
||||||
M->getFunctionList().remove(I);
|
M->getFunctionList().remove(I);
|
||||||
E = M->end();
|
E = M->end();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user