[clang] [clang][OpenMP] Add explicit default libomp value to test. (PR #221098)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 3 16:54:23 PDT 2026
https://github.com/cmtice created https://github.com/llvm/llvm-project/pull/221098
The test OMPInvariantPredicateBoundOnIntraTileLoop, in AttrTest.cpp uses '-fopenmp' without supplying an explcit value. In some places the default value is 'libomp', which works just fine for this test. But in envorinments where 'libomp' is not the default value (e.g. places that use 'libgomp' by default) the test fails. This fixes that issue by explicitly telling the test to use 'libomp'.
>From 46730560639ac3befea21aa2ef844f713afbca96 Mon Sep 17 00:00:00 2001
From: cmtice <cmtice at google.com>
Date: Thu, 3 Sep 2026 23:50:34 +0000
Subject: [PATCH] [clang][OpenMP] Add explicit default libomp value to test.
The test OMPInvariantPredicateBoundOnIntraTileLoop, in AttrTest.cpp
uses '-fopenmp' without supplying an explcit value. In some places the
default value is 'libomp', which works just fine for this test. But
in envorinments where 'libomp' is not the default value (e.g. places
that use 'libgomp' by default) the test fails. This fixes that issue
by explicitly telling the test to use 'libomp'.
---
clang/unittests/AST/AttrTest.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/clang/unittests/AST/AttrTest.cpp b/clang/unittests/AST/AttrTest.cpp
index 56096054dd267..33cc5c491db93 100644
--- a/clang/unittests/AST/AttrTest.cpp
+++ b/clang/unittests/AST/AttrTest.cpp
@@ -315,7 +315,7 @@ TEST(Attr, OMPInvariantPredicateBoundOnIntraTileLoop) {
body(i);
}
)cpp",
- {"-fopenmp"});
+ {"-fopenmp=libomp"});
ASSERT_TRUE(AST);
auto GetHint = [&AST](const char *FuncName) {
More information about the cfe-commits
mailing list