mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-12 17:32:19 +00:00
For PR411:
Change getNamedFunction -> getFunction Make llvm-extract run the StripDeadPrototypes pass. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33921 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
60ea274c70
commit
cdedc3b336
@ -64,7 +64,7 @@ int main(int argc, char **argv) {
|
||||
}
|
||||
|
||||
// Figure out which function we should extract
|
||||
Function *F = M.get()->getNamedFunction(ExtractFunc);
|
||||
Function *F = M.get()->getFunction(ExtractFunc);
|
||||
if (F == 0) {
|
||||
cerr << argv[0] << ": program doesn't contain function named '"
|
||||
<< ExtractFunc << "'!\n";
|
||||
@ -80,6 +80,7 @@ int main(int argc, char **argv) {
|
||||
if (!DeleteFn)
|
||||
Passes.add(createGlobalDCEPass()); // Delete unreachable globals
|
||||
Passes.add(createDeadTypeEliminationPass()); // Remove dead types...
|
||||
Passes.add(createStripDeadPrototypesPass()); // Remove dead func decls
|
||||
|
||||
std::ostream *Out = 0;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user