1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00

For PR411:

Change getNamedFunction -> getFunction
Make llvm-extract run the StripDeadPrototypes pass.

llvm-svn: 33921
This commit is contained in:
Reid Spencer 2007-02-05 21:17:53 +00:00
parent 2e281b54c7
commit 00fc9639f4

View File

@ -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;