From 7593745563a112ac8b3c667ce6d17ecb4e8de063 Mon Sep 17 00:00:00 2001 From: Reid Spencer Date: Sat, 21 Aug 2004 21:00:24 +0000 Subject: [PATCH] Correct to change interface of the analyzer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15986 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp b/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp index d0ba73d2dca..01053751cd2 100644 --- a/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp +++ b/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp @@ -41,6 +41,9 @@ using namespace llvm; static cl::opt InputFilename(cl::Positional, cl::desc(""), cl::init("-")); +static cl::opt + OutputFilename("-o", cl::init("-"), cl::desc("")); + static cl::opt NoDetails ("nodetails", cl::desc("Skip detailed output")); static cl::opt Dump ("dump", cl::desc("Dump low level bytecode trace")); static cl::opt Verify ("verify", cl::desc("Progressively verify module")); @@ -59,12 +62,11 @@ main(int argc, char **argv) BytecodeAnalysis bca; /// Determine what to generate - bca.dumpBytecode = Dump; bca.detailedResults = !NoDetails; bca.progressiveVerify = Verify; /// Analyze the bytecode file - Module* M = AnalyzeBytecodeFile(InputFilename, bca, &ErrorMessage); + Module* M = AnalyzeBytecodeFile(InputFilename, bca, &ErrorMessage, (Dump?Out:0)); // All that bcanalyzer does is write the gathered statistics to the output PrintBytecodeAnalysis(bca,*Out); -- 2.34.1