[OpenMP]Fix trivial build failure in MacOS
authorMats Petersson <mats.petersson@arm.com>
Tue, 16 May 2023 16:15:17 +0000 (17:15 +0100)
committerMats Petersson <mats.petersson@arm.com>
Wed, 17 May 2023 17:11:20 +0000 (18:11 +0100)
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

openmp/runtime/src/kmp_collapse.cpp

index 4ae4789..f7b72a1 100644 (file)
@@ -18,6 +18,8 @@
 #include "kmp_str.h"
 #include "kmp_collapse.h"
 
+#include <cmath>
+
 #if OMPT_SUPPORT
 #include "ompt-specific.h"
 #endif