diff options
author | Chris Lattner <sabre@nondot.org> | 2011-05-22 06:03:53 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2011-05-22 06:03:53 +0000 |
commit | c4cb237ca61bc382de4f89c2464564eabbfb8d8e (patch) | |
tree | 6170ddc37de042bde80e395e1df4ecfe5962fb9a /lib/Support/APInt.cpp | |
parent | b6fcf4cfbc075fd20f496d992180d177f4f4d721 (diff) | |
download | external_llvm-c4cb237ca61bc382de4f89c2464564eabbfb8d8e.zip external_llvm-c4cb237ca61bc382de4f89c2464564eabbfb8d8e.tar.gz external_llvm-c4cb237ca61bc382de4f89c2464564eabbfb8d8e.tar.bz2 |
fix a bug for hosts without round, PR8893.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@131842 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/APInt.cpp')
-rw-r--r-- | lib/Support/APInt.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Support/APInt.cpp b/lib/Support/APInt.cpp index 23a22ac..74d61c1 100644 --- a/lib/Support/APInt.cpp +++ b/lib/Support/APInt.cpp @@ -1375,7 +1375,7 @@ APInt APInt::sqrt() const { uint64_t(::round(::sqrt(double(isSingleWord()?VAL:pVal[0]))))); #else return APInt(BitWidth, - uint64_t(::sqrt(double(isSingleWord()?VAL:pVal[0]))) + 0.5); + uint64_t(::sqrt(double(isSingleWord()?VAL:pVal[0])) + 0.5)); #endif } |