[Openmp-commits] [openmp] 782a16d - [OpenMP]Fix trivial build failure in MacOS

Mats Petersson via Openmp-commits openmp-commits at lists.llvm.org
Wed May 17 10:12:39 PDT 2023


Author: Mats Petersson
Date: 2023-05-17T18:11:20+01:00
New Revision: 782a16db4db5bc9c145fbe27c8c652c0d4cb49d7

URL: https://github.com/llvm/llvm-project/commit/782a16db4db5bc9c145fbe27c8c652c0d4cb49d7
DIFF: https://github.com/llvm/llvm-project/commit/782a16db4db5bc9c145fbe27c8c652c0d4cb49d7.diff

LOG: [OpenMP]Fix trivial build failure in MacOS

MacOS build of LLVM with OpenMP enabled fails with an error
that it doesn't know what std::abs is. Fix by including <cmath>
so that the relevant function declaration is included.

No functional change intended.

Reviewed By: tianshilei1992

Differential Revision: https://reviews.llvm.org/D150687

Added: 
    

Modified: 
    openmp/runtime/src/kmp_collapse.cpp

Removed: 
    


################################################################################
diff  --git a/openmp/runtime/src/kmp_collapse.cpp b/openmp/runtime/src/kmp_collapse.cpp
index 4ae4789e9821d..f7b72a1d69532 100644
--- a/openmp/runtime/src/kmp_collapse.cpp
+++ b/openmp/runtime/src/kmp_collapse.cpp
@@ -18,6 +18,8 @@
 #include "kmp_str.h"
 #include "kmp_collapse.h"
 
+#include <cmath>
+
 #if OMPT_SUPPORT
 #include "ompt-specific.h"
 #endif


        


More information about the Openmp-commits mailing list