From 2cccc6220cc351b52d2cd2d0b7139502e854b68d Mon Sep 17 00:00:00 2001 From: Andrew Trick Date: Wed, 18 Sep 2013 23:31:10 +0000 Subject: whitespace git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190973 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/llvm-diff/llvm-diff.cpp | 2 +- tools/llvm-extract/llvm-extract.cpp | 2 +- tools/llvm-link/llvm-link.cpp | 2 +- tools/llvm-prof/llvm-prof.cpp | 16 ++++++++-------- 4 files changed, 11 insertions(+), 11 deletions(-) (limited to 'tools') diff --git a/tools/llvm-diff/llvm-diff.cpp b/tools/llvm-diff/llvm-diff.cpp index 6eca1e2bfc..f70219eaf5 100644 --- a/tools/llvm-diff/llvm-diff.cpp +++ b/tools/llvm-diff/llvm-diff.cpp @@ -70,7 +70,7 @@ int main(int argc, char **argv) { cl::ParseCommandLineOptions(argc, argv); LLVMContext Context; - + // Load both modules. Die if that fails. Module *LModule = ReadModule(Context, LeftFilename); Module *RModule = ReadModule(Context, RightFilename); diff --git a/tools/llvm-extract/llvm-extract.cpp b/tools/llvm-extract/llvm-extract.cpp index 9ba68b465d..dc1a410953 100644 --- a/tools/llvm-extract/llvm-extract.cpp +++ b/tools/llvm-extract/llvm-extract.cpp @@ -53,7 +53,7 @@ static cl::list ExtractFuncs("func", cl::desc("Specify function to extract"), cl::ZeroOrMore, cl::value_desc("function")); -// ExtractRegExpFuncs - The functions, matched via regular expression, to +// ExtractRegExpFuncs - The functions, matched via regular expression, to // extract from the module. static cl::list ExtractRegExpFuncs("rfunc", cl::desc("Specify function(s) to extract using a " diff --git a/tools/llvm-link/llvm-link.cpp b/tools/llvm-link/llvm-link.cpp index 652c414a9d..99cca2322d 100644 --- a/tools/llvm-link/llvm-link.cpp +++ b/tools/llvm-link/llvm-link.cpp @@ -70,7 +70,7 @@ int main(int argc, char **argv) { // Print a stack trace if we signal out. sys::PrintStackTraceOnErrorSignal(); PrettyStackTraceProgram X(argc, argv); - + LLVMContext &Context = getGlobalContext(); llvm_shutdown_obj Y; // Call llvm_shutdown() on exit. cl::ParseCommandLineOptions(argc, argv, "llvm linker\n"); diff --git a/tools/llvm-prof/llvm-prof.cpp b/tools/llvm-prof/llvm-prof.cpp index b2c3f06169..52d0130069 100644 --- a/tools/llvm-prof/llvm-prof.cpp +++ b/tools/llvm-prof/llvm-prof.cpp @@ -131,7 +131,7 @@ namespace { ProfileInfoLoader &PIL; public: static char ID; // Class identification, replacement for typeinfo. - explicit ProfileInfoPrinterPass(ProfileInfoLoader &_PIL) + explicit ProfileInfoPrinterPass(ProfileInfoLoader &_PIL) : ModulePass(ID), PIL(_PIL) {} virtual void getAnalysisUsage(AnalysisUsage &AU) const { @@ -161,7 +161,7 @@ bool ProfileInfoPrinterPass::runOnModule(Module &M) { if (FI->isDeclaration()) continue; double w = ignoreMissing(PI.getExecutionCount(FI)); FunctionCounts.push_back(std::make_pair(FI, w)); - for (Function::iterator BB = FI->begin(), BBE = FI->end(); + for (Function::iterator BB = FI->begin(), BBE = FI->end(); BB != BBE; ++BB) { double w = ignoreMissing(PI.getExecutionCount(BB)); Counts.push_back(std::make_pair(BB, w)); @@ -194,7 +194,7 @@ bool ProfileInfoPrinterPass::runOnModule(Module &M) { outs() << " ## Frequency\n"; for (unsigned i = 0, e = FunctionCounts.size(); i != e; ++i) { if (FunctionCounts[i].second == 0) { - outs() << "\n NOTE: " << e-i << " function" + outs() << "\n NOTE: " << e-i << " function" << (e-i-1 ? "s were" : " was") << " never executed!\n"; break; } @@ -210,14 +210,14 @@ bool ProfileInfoPrinterPass::runOnModule(Module &M) { TotalExecutions = 0; for (unsigned i = 0, e = Counts.size(); i != e; ++i) TotalExecutions += Counts[i].second; - + // Sort by the frequency, backwards. sort(Counts.begin(), Counts.end(), PairSecondSortReverse()); - + outs() << "\n===" << std::string(73, '-') << "===\n"; outs() << "Top 20 most frequently executed basic blocks:\n\n"; - + // Print out the function frequencies... outs() <<" ## %% \tFrequency\n"; unsigned BlocksToPrint = Counts.size(); @@ -237,7 +237,7 @@ bool ProfileInfoPrinterPass::runOnModule(Module &M) { if (PrintAnnotatedLLVM || PrintAllCode) { outs() << "\n===" << std::string(73, '-') << "===\n"; outs() << "Annotated LLVM code for the module:\n\n"; - + ProfileAnnotator PA(PI); if (FunctionsToPrint.empty() || PrintAllCode) @@ -259,7 +259,7 @@ int main(int argc, char **argv) { LLVMContext &Context = getGlobalContext(); llvm_shutdown_obj Y; // Call llvm_shutdown() on exit. - + cl::ParseCommandLineOptions(argc, argv, "llvm profile dump decoder\n"); // Read in the bitcode file... -- cgit v1.2.3