From 367373053b4c50cf84ec54d2300ddab14c60063e Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 30 Oct 2003 23:44:28 +0000 Subject: [PATCH] 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 --- tools/llvm-prof/llvm-prof.cpp | 1 + 1 file changed, 1 insertion(+) 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