mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-27 04:18:42 +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:
1 parent
1ab854aa1e
commit
6a1359229d
2 files changed
+6
No files matched your search
@@ -39,6 +39,9 @@ struct FunctionExtractorPass : public Pass {
|
||||
// Yes, it is. Keep track of it...
|
||||
Named = *I;
|
||||
|
||||
// Make sure it's globally accessable...
|
||||
Named->setInternalLinkage(false);
|
||||
|
||||
// Remove the named function from the module.
|
||||
M->getFunctionList().remove(I);
|
||||
E = M->end();
|
||||
|
||||
Reference in new issue
Block a user