diff options
Diffstat (limited to 'tools/llvm-as')
-rw-r--r-- | tools/llvm-as/as.cpp | 16 | ||||
-rw-r--r-- | tools/llvm-as/llvm-as.cpp | 16 |
2 files changed, 24 insertions, 8 deletions
diff --git a/tools/llvm-as/as.cpp b/tools/llvm-as/as.cpp index a956203..c66dd59 100644 --- a/tools/llvm-as/as.cpp +++ b/tools/llvm-as/as.cpp @@ -18,10 +18,18 @@ #include <memory> using std::cerr; -cl::String InputFilename ("", "Parse <arg> file, compile to bytecode", 0, "-"); -cl::String OutputFilename("o", "Override output filename", cl::NoFlags, ""); -cl::Flag Force ("f", "Overwrite output files", cl::NoFlags, false); -cl::Flag DumpAsm ("d", "Print assembly as parsed", cl::Hidden, false); +static cl::opt<string> +InputFilename(cl::Positional, cl::desc("<input .llvm file>"), cl::init("-")); + +static cl::opt<string> +OutputFilename("o", cl::desc("Override output filename"), + cl::value_desc("filename")); + +static cl::opt<bool> +Force("f", cl::desc("Overwrite output files")); + +static cl::opt<bool> +DumpAsm("d", cl::desc("Print assembly as parsed"), cl::Hidden); int main(int argc, char **argv) { cl::ParseCommandLineOptions(argc, argv, " llvm .ll -> .bc assembler\n"); diff --git a/tools/llvm-as/llvm-as.cpp b/tools/llvm-as/llvm-as.cpp index a956203..c66dd59 100644 --- a/tools/llvm-as/llvm-as.cpp +++ b/tools/llvm-as/llvm-as.cpp @@ -18,10 +18,18 @@ #include <memory> using std::cerr; -cl::String InputFilename ("", "Parse <arg> file, compile to bytecode", 0, "-"); -cl::String OutputFilename("o", "Override output filename", cl::NoFlags, ""); -cl::Flag Force ("f", "Overwrite output files", cl::NoFlags, false); -cl::Flag DumpAsm ("d", "Print assembly as parsed", cl::Hidden, false); +static cl::opt<string> +InputFilename(cl::Positional, cl::desc("<input .llvm file>"), cl::init("-")); + +static cl::opt<string> +OutputFilename("o", cl::desc("Override output filename"), + cl::value_desc("filename")); + +static cl::opt<bool> +Force("f", cl::desc("Overwrite output files")); + +static cl::opt<bool> +DumpAsm("d", cl::desc("Print assembly as parsed"), cl::Hidden); int main(int argc, char **argv) { cl::ParseCommandLineOptions(argc, argv, " llvm .ll -> .bc assembler\n"); |