diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2014-06-24 00:26:08 +0000 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2014-06-24 00:26:08 +0000 |
commit | 8e52bcc59106ea6221c607ab735215ca8d7a4a44 (patch) | |
tree | 29ff9b715d9cc1872263de725d1b6bef0d52c16d /include | |
parent | 784bb5992ac36b693dbca9e9e5b03b76756dcdd9 (diff) | |
download | llvm-8e52bcc59106ea6221c607ab735215ca8d7a4a44.tar.gz llvm-8e52bcc59106ea6221c607ab735215ca8d7a4a44.tar.bz2 llvm-8e52bcc59106ea6221c607ab735215ca8d7a4a44.tar.xz |
Support: Return ScaledNumbers::MaxScale from getQuotient()
Return MaxScale now that it's available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211559 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Support/ScaledNumber.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/llvm/Support/ScaledNumber.h b/include/llvm/Support/ScaledNumber.h index b12f347806..e7c329f7bf 100644 --- a/include/llvm/Support/ScaledNumber.h +++ b/include/llvm/Support/ScaledNumber.h @@ -148,7 +148,7 @@ std::pair<uint32_t, int16_t> divide32(uint32_t Dividend, uint32_t Divisor); /// /// Implemented with one 64-bit integer divide/remainder pair. /// -/// Returns \c (DigitsT_MAX, INT16_MAX) for divide-by-zero (0 for 0/0). +/// Returns \c (DigitsT_MAX, MaxScale) for divide-by-zero (0 for 0/0). template <class DigitsT> std::pair<DigitsT, int16_t> getQuotient(DigitsT Dividend, DigitsT Divisor) { static_assert(!std::numeric_limits<DigitsT>::is_signed, "expected unsigned"); @@ -159,7 +159,7 @@ std::pair<DigitsT, int16_t> getQuotient(DigitsT Dividend, DigitsT Divisor) { if (!Dividend) return std::make_pair(0, 0); if (!Divisor) - return std::make_pair(std::numeric_limits<DigitsT>::max(), INT16_MAX); + return std::make_pair(std::numeric_limits<DigitsT>::max(), MaxScale); if (getWidth<DigitsT>() == 64) return divide64(Dividend, Divisor); |