#include "llvm/ADT/SmallVector.h"
#include "llvm/Bitcode/BitcodeReader.h"
#include "llvm/Bitcode/BitcodeWriter.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/IR/Module.h"
#include "llvm/IRReader/IRReader.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/SourceMgr.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
#include <memory>
#include <string>
#include <system_error>
#include <vector>
usingnamespacellvm;
cl::OptionCategory CatCategory("llvm-cat Options");
static cl::opt<bool>
BinaryCat("b", cl::desc("Whether to perform binary concatenation"),
cl::cat(CatCategory));
static cl::opt<std::string> OutputFilename("o", cl::Required,
cl::desc("Output filename"),
cl::value_desc("filename"),
cl::cat(CatCategory));
static cl::list<std::string> InputFilenames(cl::Positional,
cl::desc("<input files>"),
cl::cat(CatCategory));
int main(int argc, char **argv) { … }