Fixed a build problem when there were headers
[oota-llvm.git] / include / llvm / Support / BranchProbability.h
index 74d64194cf668c5c6a650e7ab768814abb46d9f8..9aab6ace6e3f0e249ec027157a72d56eea81bf3d 100644 (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;
 
@@ -56,10 +56,6 @@ public:
   /// result.
   ///
   /// \return \c Num times \c this.
-  ///
-  /// \note This code should be shared with (or replaced by) the implementation
-  /// of \a BlockFrequency::scale(), which seems to be calculating something
-  /// similar.
   uint64_t scale(uint64_t Num) const;
 
   /// \brief Scale a large integer by the inverse.
@@ -68,10 +64,6 @@ public:
   /// Returns the floor of the result.
   ///
   /// \return \c Num divided by \c this.
-  ///
-  /// \note This code should be shared with (or replaced by) the implementation
-  /// of \a BlockFrequency::scale(), which seems to be calculating something
-  /// similar.
   uint64_t scaleByInverse(uint64_t Num) const;
 
   bool operator==(BranchProbability RHS) const {
@@ -88,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);
+}
 
 }