//
// The LLVM Compiler Infrastructure
//
-// This file was developed by the LLVM research group and is distributed under
-// the University of Illinois Open Source License. See LICENSE.TXT for details.
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
static cl::opt<bool>
Force("f", cl::desc("Overwrite output files"));
+static cl::opt<bool>
+DisableOutput("disable-output", cl::desc("Disable output"), cl::init(false));
+
static cl::opt<bool>
DumpAsm("d", cl::desc("Print assembly as parsed"), cl::Hidden);
int main(int argc, char **argv) {
llvm_shutdown_obj X; // Call llvm_shutdown() on exit.
- cl::ParseCommandLineOptions(argc, argv, " llvm .ll -> .bc assembler\n");
+ cl::ParseCommandLineOptions(argc, argv, "llvm .ll -> .bc assembler\n");
sys::PrintStackTraceOnErrorSignal();
int exitCode = 0;
return 1;
}
- if (Force || !CheckBytecodeOutputToConsole(Out,true))
- WriteBitcodeToFile(M.get(), *Out);
+ if (!DisableOutput)
+ if (Force || !CheckBitcodeOutputToConsole(Out,true))
+ WriteBitcodeToFile(M.get(), *Out);
} catch (const std::string& msg) {
cerr << argv[0] << ": " << msg << "\n";
exitCode = 1;