aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Analysis
diff options
context:
space:
mode:
authorAndreas Neustifter <astifter-llvm@gmx.at>2009-08-26 15:13:44 +0000
committerAndreas Neustifter <astifter-llvm@gmx.at>2009-08-26 15:13:44 +0000
commitff271e13539a43e804cab4457821a46a8bddc2ec (patch)
tree26a6766bb52fba3bef3eb045facff68fdaeff3c3 /include/llvm/Analysis
parentaf70e5c676140a55ec619f552c8fd76b7edf3c6d (diff)
downloadexternal_llvm-ff271e13539a43e804cab4457821a46a8bddc2ec.zip
external_llvm-ff271e13539a43e804cab4457821a46a8bddc2ec.tar.gz
external_llvm-ff271e13539a43e804cab4457821a46a8bddc2ec.tar.bz2
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/llvm/Analysis')
-rw-r--r--include/llvm/Analysis/LoopInfo.h1
-rw-r--r--include/llvm/Analysis/ProfileInfo.h13
2 files changed, 13 insertions, 1 deletions
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<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 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 <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