From ff271e13539a43e804cab4457821a46a8bddc2ec Mon Sep 17 00:00:00 2001 From: Andreas Neustifter Date: Wed, 26 Aug 2009 15:13:44 +0000 Subject: Implemented comments from Daniel Dunbar. (See http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20090817/084958.html) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80100 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Analysis/LoopInfo.h | 1 - include/llvm/Analysis/ProfileInfo.h | 13 +++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) (limited to 'include/llvm/Analysis') diff --git a/include/llvm/Analysis/LoopInfo.h b/include/llvm/Analysis/LoopInfo.h index a31ace7..d4dd412 100644 --- a/include/llvm/Analysis/LoopInfo.h +++ b/include/llvm/Analysis/LoopInfo.h @@ -213,7 +213,6 @@ public: } /// getExitEdges - Return all pairs of (_inside_block_,_outside_block_). - /// (Modelled after getExitingBlocks().) typedef std::pair Edge; void getExitEdges(SmallVectorImpl &ExitEdges) const { // Sort the blocks vector so that we can use binary search to do quick diff --git a/include/llvm/Analysis/ProfileInfo.h b/include/llvm/Analysis/ProfileInfo.h index 6025e9f..d8b9035 100644 --- a/include/llvm/Analysis/ProfileInfo.h +++ b/include/llvm/Analysis/ProfileInfo.h @@ -22,6 +22,7 @@ #define LLVM_ANALYSIS_PROFILEINFO_H #include "llvm/BasicBlock.h" +#include "llvm/Support/raw_ostream.h" #include #include #include @@ -103,6 +104,18 @@ namespace llvm { /// profiling information for the module from the specified filename, making /// it available to the optimizers. Pass *createProfileLoaderPass(const std::string &Filename); + + static raw_ostream& operator<<(raw_ostream &O, + ProfileInfo::Edge E) ATTRIBUTE_USED; + static raw_ostream& operator<<(raw_ostream &O, + ProfileInfo::Edge E) { + O<<"("; + O<<(E.first?E.first->getNameStr():"0"); + O<<","; + O<<(E.second?E.second->getNameStr():"0"); + return O<<")"; + } + } // End llvm namespace #endif -- cgit v1.1