BranchProb: Simplify printing code

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207559 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Duncan P. N. Exon Smith
2014-04-29 17:07:42 +00:00
parent a70510a1c6
commit 67f5fcac4b
2 changed files with 8 additions and 12 deletions

View File

@@ -46,7 +46,7 @@ public:
return BranchProbability(D - N, D);
}
void print(raw_ostream &OS) const;
raw_ostream &print(raw_ostream &OS) const;
void dump() const;
@@ -80,7 +80,9 @@ public:
bool operator>=(BranchProbability RHS) const { return !(*this < RHS); }
};
raw_ostream &operator<<(raw_ostream &OS, const BranchProbability &Prob);
inline raw_ostream &operator<<(raw_ostream &OS, const BranchProbability &Prob) {
return Prob.print(OS);
}
}