llvm.org GIT mirror llvm / 566a35a
clang-format llvm-as.cpp (NFC) This reduces unrelated changes in other patches (such as D18763) when changes to this file are clang formatted. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@265346 91177308-0d34-0410-b5e6-96231b3b80d8 Teresa Johnson 3 years ago
1 changed file(s) with 17 addition(s) and 16 deletion(s). Raw diff Collapse all Expand all
1414 //
1515 //===----------------------------------------------------------------------===//
1616
17 #include "llvm/IR/LLVMContext.h"
1817 #include "llvm/AsmParser/Parser.h"
1918 #include "llvm/Bitcode/ReaderWriter.h"
19 #include "llvm/IR/LLVMContext.h"
2020 #include "llvm/IR/Module.h"
2121 #include "llvm/IR/Verifier.h"
2222 #include "llvm/Support/CommandLine.h"
3030 #include
3131 using namespace llvm;
3232
33 static cl::opt
34 InputFilename(cl::Positional, cl::desc(""), cl::init("-"));
33 static cl::opt InputFilename(cl::Positional,
34 cl::desc(""),
35 cl::init("-"));
3536
36 static cl::opt
37 OutputFilename("o", cl::desc("Override output filename"),
38 cl::value_desc("filename"));
37 static cl::opt OutputFilename("o",
38 cl::desc("Override output filename"),
39 cl::value_desc("filename"));
3940
40 static cl::opt
41 Force("f", cl::desc("Enable binary output on terminals"));
41 static cl::opt Force("f", cl::desc("Enable binary output on terminals"));
4242
43 static cl::opt
44 DisableOutput("disable-output", cl::desc("Disable output"), cl::init(false));
43 static cl::opt DisableOutput("disable-output", cl::desc("Disable output"),
44 cl::init(false));
4545
4646 static cl::opt EmitSummaryIndex("module-summary",
4747 cl::desc("Emit module summary index"),
5050 static cl::opt EmitModuleHash("module-hash", cl::desc("Emit module hash"),
5151 cl::init(false));
5252
53 static cl::opt
54 DumpAsm("d", cl::desc("Print assembly as parsed"), cl::Hidden);
53 static cl::opt DumpAsm("d", cl::desc("Print assembly as parsed"),
54 cl::Hidden);
5555
5656 static cl::opt
57 DisableVerify("disable-verify", cl::Hidden,
58 cl::desc("Do not run verifier on input LLVM (dangerous!)"));
57 DisableVerify("disable-verify", cl::Hidden,
58 cl::desc("Do not run verifier on input LLVM (dangerous!)"));
5959
6060 static cl::opt PreserveBitcodeUseListOrder(
6161 "preserve-bc-uselistorder",
9595 sys::PrintStackTraceOnErrorSignal();
9696 PrettyStackTraceProgram X(argc, argv);
9797 LLVMContext &Context = getGlobalContext();
98 llvm_shutdown_obj Y; // Call llvm_shutdown() on exit.
98 llvm_shutdown_obj Y; // Call llvm_shutdown() on exit.
9999 cl::ParseCommandLineOptions(argc, argv, "llvm .ll -> .bc assembler\n");
100100
101101 // Parse the file now...
117117 }
118118 }
119119
120 if (DumpAsm) errs() << "Here's the assembly:\n" << *M.get();
120 if (DumpAsm)
121 errs() << "Here's the assembly:\n" << *M.get();
121122
122123 if (!DisableOutput)
123124 WriteOutputFile(M.get());