[llvm] [OMP] Add omp.h in test (PR #215882)
Kelvin Li via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 12 13:03:29 PDT 2026
https://github.com/kkwli created https://github.com/llvm/llvm-project/pull/215882
`omp_get_ancestor_thread_num` and `omp_get_team_size` are only declared in `omp.h`.
Fix build breakage in https://github.com/llvm/llvm-project/pull/215841#issuecomment-5271979382
>From 6b5686aacb23bf4861d7bffa4b6c2d0def7428b5 Mon Sep 17 00:00:00 2001
From: Kelvin Li <kli at ca.ibm.com>
Date: Wed, 12 Aug 2026 15:57:48 -0400
Subject: [PATCH] [OMP] Add omp.h in test
The omp_get_ancestor_thread_num routine is declared in omp.h.
---
offload/test/offloading/ompx_bare_multi_dim.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/offload/test/offloading/ompx_bare_multi_dim.cpp b/offload/test/offloading/ompx_bare_multi_dim.cpp
index aa854114f9914..93a7b3604e411 100644
--- a/offload/test/offloading/ompx_bare_multi_dim.cpp
+++ b/offload/test/offloading/ompx_bare_multi_dim.cpp
@@ -4,6 +4,7 @@
// REQUIRES: gpu
// clang-format on
+#include <omp.h>
#include <ompx.h>
#include <cassert>
More information about the llvm-commits
mailing list