summaryrefslogtreecommitdiff
path: root/lib/Support/APInt.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-03-26 23:54:15 +0000
committerChris Lattner <sabre@nondot.org>2010-03-26 23:54:15 +0000
commit67eadb397a9baf56ff6c227ffefa7c3cff86ae4b (patch)
tree627b3d6241eed24a58143722c52de417aace3d2f /lib/Support/APInt.cpp
parent9ee9d7d4931ebfb5d16ca401aef96aeb88689d69 (diff)
downloadllvm-67eadb397a9baf56ff6c227ffefa7c3cff86ae4b.tar.gz
llvm-67eadb397a9baf56ff6c227ffefa7c3cff86ae4b.tar.bz2
llvm-67eadb397a9baf56ff6c227ffefa7c3cff86ae4b.tar.xz
improve portability to minix, patch by
Kees van Reeuwijk for PR6704 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99677 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/APInt.cpp')
-rw-r--r--lib/Support/APInt.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Support/APInt.cpp b/lib/Support/APInt.cpp
index e4e3296a00..50025d214b 100644
--- a/lib/Support/APInt.cpp
+++ b/lib/Support/APInt.cpp
@@ -1382,8 +1382,8 @@ APInt APInt::sqrt() const {
// libc sqrt function which will probably use a hardware sqrt computation.
// This should be faster than the algorithm below.
if (magnitude < 52) {
-#ifdef _MSC_VER
- // Amazingly, VC++ doesn't have round().
+#if defined( _MSC_VER ) || defined(_MINIX)
+ // Amazingly, VC++ and Minix don't have round().
return APInt(BitWidth,
uint64_t(::sqrt(double(isSingleWord()?VAL:pVal[0]))) + 0.5);
#else