From cdedc3b336ff7552e439723fdb96dda68b1dbbdb Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Mon, 5 Feb 2007 21:17:53 +0000 Subject: 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 --- tools/llvm-extract/llvm-extract.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tools/llvm-extract') diff --git a/tools/llvm-extract/llvm-extract.cpp b/tools/llvm-extract/llvm-extract.cpp index 932f19ef60..b26fd9c5b0 100644 --- a/tools/llvm-extract/llvm-extract.cpp +++ b/tools/llvm-extract/llvm-extract.cpp @@ -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; -- cgit v1.2.3