source: icGREP/icgrep-devel/icgrep/lz4_decoder.cpp @ 6144

Last change on this file since 6144 was 6137, checked in by xwa163, 15 months ago
  1. LZ4 ScanMatch? pipeline
  2. Refactor LZ4 Generator
  3. Adjust some naming
File size: 1.1 KB
Line 
1/*
2 *  Copyright (c) 2017 International Characters.
3 *  This software is licensed to the public under the Open Software License 3.0.
4 *  icgrep is a trademark of International Characters.
5 */
6
7#include <llvm/Support/PrettyStackTrace.h>
8#include <lz4/lz4_decompression_generator.h>
9
10namespace re { class CC; }
11
12using namespace llvm;
13
14static cl::OptionCategory lz4dFlags("Command Flags", "lz4d options");
15static cl::opt<std::string> inputFile(cl::Positional, cl::desc("<input file>"), cl::Required, cl::cat(lz4dFlags));
16static cl::opt<std::string> outputFile(cl::Positional, cl::desc("<output file>"), cl::Required, cl::cat(lz4dFlags));
17static cl::opt<bool> overwriteOutput("f", cl::desc("Overwrite existing output file."), cl::init(false), cl::cat(lz4dFlags));
18
19int main(int argc, char *argv[]) {
20    sys::PrintStackTraceOnErrorSignal(argv[0]);
21    llvm::PrettyStackTraceProgram X(argc, argv);
22    llvm_shutdown_obj shutdown;
23    codegen::ParseCommandLineOptions(argc, argv, {&lz4dFlags, codegen::codegen_flags()});
24
25    LZ4DecompressionGenerator g;
26    return g.decompress(std::move(inputFile), std::move(outputFile), overwriteOutput);
27}
Note: See TracBrowser for help on using the repository browser.