aboutsummaryrefslogtreecommitdiff
path: root/contrib/llvm/lib/Analysis/ProfileInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/llvm/lib/Analysis/ProfileInfo.cpp')
-rw-r--r--contrib/llvm/lib/Analysis/ProfileInfo.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/contrib/llvm/lib/Analysis/ProfileInfo.cpp b/contrib/llvm/lib/Analysis/ProfileInfo.cpp
index b5b7ac1e5011..9626a48b9d0d 100644
--- a/contrib/llvm/lib/Analysis/ProfileInfo.cpp
+++ b/contrib/llvm/lib/Analysis/ProfileInfo.cpp
@@ -12,16 +12,16 @@
//
//===----------------------------------------------------------------------===//
#define DEBUG_TYPE "profile-info"
-#include "llvm/Analysis/Passes.h"
#include "llvm/Analysis/ProfileInfo.h"
+#include "llvm/ADT/SmallSet.h"
+#include "llvm/Analysis/Passes.h"
#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/Pass.h"
#include "llvm/Support/CFG.h"
-#include "llvm/ADT/SmallSet.h"
-#include <set>
-#include <queue>
#include <limits>
+#include <queue>
+#include <set>
using namespace llvm;
namespace llvm {
@@ -249,7 +249,7 @@ const BasicBlock *ProfileInfoT<Function,BasicBlock>::
succ_const_iterator Succ = succ_begin(BB), End = succ_end(BB);
if (Succ == End) {
- P[0] = BB;
+ P[(const BasicBlock*)0] = BB;
if (Mode & GetPathToExit) {
hasFoundPath = true;
BB = 0;
@@ -752,10 +752,10 @@ void ProfileInfoT<Function,BasicBlock>::repair(const Function *F) {
Succ != End; ++Succ) {
Path P;
GetPath(*Succ, 0, P, GetPathToExit);
- if (Dest && Dest != P[0]) {
+ if (Dest && Dest != P[(const BasicBlock*)0]) {
AllEdgesHaveSameReturn = false;
}
- Dest = P[0];
+ Dest = P[(const BasicBlock*)0];
}
if (AllEdgesHaveSameReturn) {
if(EstimateMissingEdges(BB)) {
@@ -927,7 +927,7 @@ void ProfileInfoT<Function,BasicBlock>::repair(const Function *F) {
Path P;
const BasicBlock *Dest = GetPath(BB, 0, P, GetPathToExit | GetPathWithNewEdges);
- Dest = P[0];
+ Dest = P[(const BasicBlock*)0];
if (!Dest) continue;
if (getEdgeWeight(getEdge(Dest,0)) == MissingValue) {