[Openmp-commits] [PATCH] D150687: [OpenMP]Fix trivial build failure in MacOS

Mats Petersson via Phabricator via Openmp-commits openmp-commits at lists.llvm.org
Tue May 16 09:19:30 PDT 2023

Leporacanthicus created this revision.
Herald added subscribers: sunshaoce, guansong, yaxunl.
Herald added a project: All.
Leporacanthicus requested review of this revision.
Herald added a reviewer: jdoerfert.
Herald added subscribers: openmp-commits, jplehr, sstefan1.
Herald added a project: OpenMP.

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.

  rG LLVM Github Monorepo



Index: openmp/runtime/src/kmp_collapse.cpp
--- openmp/runtime/src/kmp_collapse.cpp
+++ openmp/runtime/src/kmp_collapse.cpp
@@ -18,6 +18,8 @@
 #include "kmp_str.h"
 #include "kmp_collapse.h"
+#include <cmath>
 #include "ompt-specific.h"

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D150687.522660.patch
Type: text/x-patch
Size: 334 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/openmp-commits/attachments/20230516/c97379d9/attachment.bin>

More information about the Openmp-commits mailing list