From ef00f9d377040c9599ac827daaaa0722381fd310 Mon Sep 17 00:00:00 2001 From: Devang Patel Date: Thu, 21 Feb 2008 01:41:25 +0000 Subject: Add -disable-output option. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@47422 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/llvm-as/llvm-as.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'tools') diff --git a/tools/llvm-as/llvm-as.cpp b/tools/llvm-as/llvm-as.cpp index 0265336..d9fa1fa 100644 --- a/tools/llvm-as/llvm-as.cpp +++ b/tools/llvm-as/llvm-as.cpp @@ -40,6 +40,9 @@ static cl::opt Force("f", cl::desc("Overwrite output files")); static cl::opt +DisableOutput("disable-output", cl::desc("Disable output"), cl::init(false)); + +static cl::opt DumpAsm("d", cl::desc("Print assembly as parsed"), cl::Hidden); static cl::opt @@ -125,8 +128,9 @@ int main(int argc, char **argv) { return 1; } - if (Force || !CheckBitcodeOutputToConsole(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; -- cgit v1.1