diff options
author | Chris Lattner <sabre@nondot.org> | 2010-03-26 23:54:15 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-03-26 23:54:15 +0000 |
commit | 35a069b3a527313752e79b513f495f7676a686c1 (patch) | |
tree | 5356bd720fb308b2b16d9510d60e34baafd6c993 /llvm/lib/Support/APInt.cpp | |
parent | 93acfbf44160b73da601b453fd40dd83eca0fb21 (diff) | |
download | llvm-35a069b3a527313752e79b513f495f7676a686c1.zip llvm-35a069b3a527313752e79b513f495f7676a686c1.tar.gz llvm-35a069b3a527313752e79b513f495f7676a686c1.tar.bz2 |
improve portability to minix, patch by
Kees van Reeuwijk for PR6704
llvm-svn: 99677
Diffstat (limited to 'llvm/lib/Support/APInt.cpp')
-rw-r--r-- | llvm/lib/Support/APInt.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Support/APInt.cpp b/llvm/lib/Support/APInt.cpp index e4e3296..50025d2 100644 --- a/llvm/lib/Support/APInt.cpp +++ b/llvm/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 |