[Openmp-commits] [openmp] 2664668 - [libomp] Fix debug build after #176164 (#215961)
via Openmp-commits
openmp-commits at lists.llvm.org
Thu Aug 13 01:16:30 PDT 2026
Author: Robert Imschweiler
Date: 2026-08-13T10:16:25+02:00
New Revision: 26646686161b302f7f53776637f1d3cc1eca4b01
URL: https://github.com/llvm/llvm-project/commit/26646686161b302f7f53776637f1d3cc1eca4b01
DIFF: https://github.com/llvm/llvm-project/commit/26646686161b302f7f53776637f1d3cc1eca4b01.diff
LOG: [libomp] Fix debug build after #176164 (#215961)
Fixes https://github.com/llvm/llvm-project/issues/215937.
Added:
Modified:
openmp/runtime/src/kmp_traits.h
Removed:
################################################################################
diff --git a/openmp/runtime/src/kmp_traits.h b/openmp/runtime/src/kmp_traits.h
index ed19ceccd8846..66913bd9db22c 100644
--- a/openmp/runtime/src/kmp_traits.h
+++ b/openmp/runtime/src/kmp_traits.h
@@ -103,7 +103,12 @@ class kmp_trait {
kmp_trait &operator=(const kmp_trait &) = delete;
kmp_trait &operator=(kmp_trait &&) = delete;
- virtual bool match(int device) const = 0;
+ // Not pure virtual to avoid a dependency on __cxa_pure_virtual, which lives
+ // in libsupc++ and is not linked into libomp. Derived classes must override.
+ virtual bool match([[maybe_unused]] int device) const {
+ KMP_ASSERT2(0, "kmp_trait::match() must be overridden");
+ return false;
+ }
// Use KMP_INTERNAL_MALLOC/KMP_INTERNAL_FREE for memory management.
void *operator new(size_t size) { return KMP_INTERNAL_MALLOC(size); }
@@ -199,7 +204,13 @@ class kmp_trait_expr {
kmp_trait_expr(expr_type type, bool negated)
: _type(type), negated(negated) {}
- virtual bool match_impl(int device, int num_devices) const = 0;
+ // Not pure virtual to avoid a dependency on __cxa_pure_virtual, which lives
+ // in libsupc++ and is not linked into libomp. Derived classes must override.
+ virtual bool match_impl([[maybe_unused]] int device,
+ [[maybe_unused]] int num_devices) const {
+ KMP_ASSERT2(0, "kmp_trait_expr::match_impl() must be overridden");
+ return false;
+ }
public:
virtual ~kmp_trait_expr() = default;
More information about the Openmp-commits
mailing list