diff --git a/include/llvm/Support/BranchProbability.h b/include/llvm/Support/BranchProbability.h index 4b5d9044007..eedf69247ef 100644 --- a/include/llvm/Support/BranchProbability.h +++ b/include/llvm/Support/BranchProbability.h @@ -42,7 +42,7 @@ public: uint32_t getDenominator() const { return D; } // Return (1 - Probability). - BranchProbability getCompl() { + BranchProbability getCompl() const { return BranchProbability(D - N, D); }