Changeset View
Changeset View
Standalone View
Standalone View
tools/llvm-as/llvm-as.cpp
Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | |||||
static cl::opt<bool> | static cl::opt<bool> | ||||
DisableOutput("disable-output", cl::desc("Disable output"), cl::init(false)); | DisableOutput("disable-output", cl::desc("Disable output"), cl::init(false)); | ||||
static cl::opt<bool> EmitSummaryIndex("module-summary", | static cl::opt<bool> EmitSummaryIndex("module-summary", | ||||
cl::desc("Emit module summary index"), | cl::desc("Emit module summary index"), | ||||
cl::init(false)); | cl::init(false)); | ||||
static cl::opt<bool> EmitModuleHash("module-hash", cl::desc("Emit module hash"), | |||||
cl::init(false)); | |||||
static cl::opt<bool> | static cl::opt<bool> | ||||
DumpAsm("d", cl::desc("Print assembly as parsed"), cl::Hidden); | DumpAsm("d", cl::desc("Print assembly as parsed"), cl::Hidden); | ||||
static cl::opt<bool> | static cl::opt<bool> | ||||
DisableVerify("disable-verify", cl::Hidden, | DisableVerify("disable-verify", cl::Hidden, | ||||
cl::desc("Do not run verifier on input LLVM (dangerous!)")); | cl::desc("Do not run verifier on input LLVM (dangerous!)")); | ||||
static cl::opt<bool> PreserveBitcodeUseListOrder( | static cl::opt<bool> PreserveBitcodeUseListOrder( | ||||
Show All 18 Lines | std::unique_ptr<tool_output_file> Out( | ||||
new tool_output_file(OutputFilename, EC, sys::fs::F_None)); | new tool_output_file(OutputFilename, EC, sys::fs::F_None)); | ||||
if (EC) { | if (EC) { | ||||
errs() << EC.message() << '\n'; | errs() << EC.message() << '\n'; | ||||
exit(1); | exit(1); | ||||
} | } | ||||
if (Force || !CheckBitcodeOutputToConsole(Out->os(), true)) | if (Force || !CheckBitcodeOutputToConsole(Out->os(), true)) | ||||
WriteBitcodeToFile(M, Out->os(), PreserveBitcodeUseListOrder, | WriteBitcodeToFile(M, Out->os(), PreserveBitcodeUseListOrder, | ||||
EmitSummaryIndex); | EmitSummaryIndex, EmitModuleHash); | ||||
// Declare success. | // Declare success. | ||||
Out->keep(); | Out->keep(); | ||||
} | } | ||||
int main(int argc, char **argv) { | int main(int argc, char **argv) { | ||||
// Print a stack trace if we signal out. | // Print a stack trace if we signal out. | ||||
sys::PrintStackTraceOnErrorSignal(); | sys::PrintStackTraceOnErrorSignal(); | ||||
Show All 31 Lines |