From: Chris Lattner Date: Thu, 30 Oct 2003 23:44:28 +0000 (+0000) Subject: If only have function profile, don't print out "not executed" for all of the blocks :) X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=367373053b4c50cf84ec54d2300ddab14c60063e;p=oota-llvm.git If only have function profile, don't print out "not executed" for all of the blocks :) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9622 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/tools/llvm-prof/llvm-prof.cpp b/tools/llvm-prof/llvm-prof.cpp index 5f114474b57..5911918b161 100644 --- a/tools/llvm-prof/llvm-prof.cpp +++ b/tools/llvm-prof/llvm-prof.cpp @@ -64,6 +64,7 @@ namespace { << " times.\n;;;\n"; } virtual void emitBasicBlockAnnot(const BasicBlock *BB, std::ostream &OS) { + if (BlockFreqs.empty()) return; if (unsigned Count = BlockFreqs[BB]) OS << ";;; Executed " << Count << " times.\n"; else