summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp
diff options
context:
space:
mode:
authorTim Shen <timshen91@gmail.com>2016-08-19 21:20:13 +0000
committerTim Shen <timshen91@gmail.com>2016-08-19 21:20:13 +0000
commitb5e0f5ac953243829d52aaa0bab65899810b880b (patch)
treed20eb83e0345ef7c1da8278f0a3baa0fadef4b98 /llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp
parente4582d4a2e36a29b8b7bf3d6e2b20c7ce600ece3 (diff)
downloadbcm5719-llvm-b5e0f5ac953243829d52aaa0bab65899810b880b.tar.gz
bcm5719-llvm-b5e0f5ac953243829d52aaa0bab65899810b880b.zip
[GraphTraits] Make nodes_iterator dereference to NodeType*/NodeRef
Currently nodes_iterator may dereference to a NodeType* or a NodeType&. Make them all dereference to NodeType*, which is NodeRef later. Differential Revision: https://reviews.llvm.org/D23704 Differential Revision: https://reviews.llvm.org/D23705 llvm-svn: 279326
Diffstat (limited to 'llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp b/llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp
index 22d47fe1443..4147e5e1bb6 100644
--- a/llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp
+++ b/llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp
@@ -55,7 +55,7 @@ template <> struct GraphTraits<MachineBlockFrequencyInfo *> {
typedef const MachineBasicBlock NodeType;
typedef const MachineBasicBlock *NodeRef;
typedef MachineBasicBlock::const_succ_iterator ChildIteratorType;
- typedef MachineFunction::const_iterator nodes_iterator;
+ typedef pointer_iterator<MachineFunction::const_iterator> nodes_iterator;
static inline const NodeType *
getEntryNode(const MachineBlockFrequencyInfo *G) {
@@ -71,11 +71,11 @@ template <> struct GraphTraits<MachineBlockFrequencyInfo *> {
}
static nodes_iterator nodes_begin(const MachineBlockFrequencyInfo *G) {
- return G->getFunction()->begin();
+ return nodes_iterator(G->getFunction()->begin());
}
static nodes_iterator nodes_end(const MachineBlockFrequencyInfo *G) {
- return G->getFunction()->end();
+ return nodes_iterator(G->getFunction()->end());
}
};
OpenPOWER on IntegriCloud