diff options
author | Andreas Neustifter <astifter-llvm@gmx.at> | 2009-08-26 15:13:44 +0000 |
---|---|---|
committer | Andreas Neustifter <astifter-llvm@gmx.at> | 2009-08-26 15:13:44 +0000 |
commit | ff271e13539a43e804cab4457821a46a8bddc2ec (patch) | |
tree | 26a6766bb52fba3bef3eb045facff68fdaeff3c3 /include | |
parent | af70e5c676140a55ec619f552c8fd76b7edf3c6d (diff) |
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
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Analysis/LoopInfo.h | 1 | ||||
-rw-r--r-- | include/llvm/Analysis/ProfileInfo.h | 13 |
2 files changed, 13 insertions, 1 deletions
diff --git a/include/llvm/Analysis/LoopInfo.h b/include/llvm/Analysis/LoopInfo.h index a31ace76e1..d4dd412d2c 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<const BlockT*,const BlockT*> Edge; void getExitEdges(SmallVectorImpl<Edge> &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 6025e9f9fe..d8b9035492 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 <cassert> #include <string> #include <map> @@ -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 |