summaryrefslogtreecommitdiff
path: root/tools/llvm-extract
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-07-22 02:10:13 +0000
committerChris Lattner <sabre@nondot.org>2002-07-22 02:10:13 +0000
commit5ff62e90d0bc321206023897edc1e2691cb0fbb6 (patch)
treef9dd91f41ef5858a217a9b871d0e3d8fe089da99 /tools/llvm-extract
parent50e3f88d38d93edcec9047322da8ed43aefc9e3d (diff)
downloadllvm-5ff62e90d0bc321206023897edc1e2691cb0fbb6.tar.gz
llvm-5ff62e90d0bc321206023897edc1e2691cb0fbb6.tar.bz2
llvm-5ff62e90d0bc321206023897edc1e2691cb0fbb6.tar.xz
*** empty log message ***
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2985 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-extract')
-rw-r--r--tools/llvm-extract/llvm-extract.cpp13
1 files changed, 11 insertions, 2 deletions
diff --git a/tools/llvm-extract/llvm-extract.cpp b/tools/llvm-extract/llvm-extract.cpp
index d1680c0967..4730f54250 100644
--- a/tools/llvm-extract/llvm-extract.cpp
+++ b/tools/llvm-extract/llvm-extract.cpp
@@ -18,8 +18,17 @@
#include "Support/CommandLine.h"
#include <memory>
-static cl::String InputFilename("", "Specify input bytecode file", 0, "-");
-static cl::String ExtractFunc("func", "Specify function to extract", 0, "main");
+// InputFilename - The filename to read from.
+static cl::opt<string>
+InputFilename(cl::Positional, cl::desc("<input bytecode file>"),
+ cl::init("-"), cl::value_desc("filename"));
+
+
+// ExtractFunc - The function to extract from the module... defaults to main.
+static cl::opt<string>
+ExtractFunc("func", cl::desc("Specify function to extract"), cl::init("main"),
+ cl::value_desc("function"));
+
struct FunctionExtractorPass : public Pass {
const char *getPassName() const { return "Function Extractor"; }