aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib
diff options
context:
space:
mode:
authorKrzysztof Parzyszek <Krzysztof.Parzyszek@amd.com>2024-11-20 10:38:06 -0600
committerGitHub <noreply@github.com>2024-11-20 10:38:06 -0600
commitfb4ecada815ceee37536a26b4ff5ce231226b23e (patch)
treef41379686701640dff907ba2cb027a4efeefe3bd /llvm/lib
parent4b3b74dffa0aa76169cb67c3cb7ccf152c2c03aa (diff)
downloadllvm-fb4ecada815ceee37536a26b4ff5ce231226b23e.zip
llvm-fb4ecada815ceee37536a26b4ff5ce231226b23e.tar.gz
llvm-fb4ecada815ceee37536a26b4ff5ce231226b23e.tar.bz2
[flang][OpenMP] Change clause modifier representation in parser (#116656)
The main issue to solve is that OpenMP modifiers can be specified in any order, so the parser cannot expect any specific modifier at a given position. To solve that, define modifier to be a union of all allowable specific modifiers for a given clause. Additionally, implement modifier descriptors: for each modifier the corresponding descriptor contains a set of properties of the modifier that allow a common set of semantic checks. Start with the syntactic properties defined in the spec: Required, Unique, Exclusive, Ultimate, and implement common checks to verify each of them. OpenMP modifier overhaul: #2/3
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Frontend/OpenMP/OMP.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Frontend/OpenMP/OMP.cpp b/llvm/lib/Frontend/OpenMP/OMP.cpp
index 37b7784..2792dc4 100644
--- a/llvm/lib/Frontend/OpenMP/OMP.cpp
+++ b/llvm/lib/Frontend/OpenMP/OMP.cpp
@@ -189,6 +189,11 @@ bool isCombinedConstruct(Directive D) {
return !getLeafConstructs(D).empty() && !isCompositeConstruct(D);
}
+ArrayRef<unsigned> getOpenMPVersions() {
+ static unsigned Versions[]{45, 50, 51, 52, 60};
+ return Versions;
+}
+
std::string prettifyFunctionName(StringRef FunctionName) {
// Internalized functions have the right name, but simply a suffix.
if (FunctionName.ends_with(".internalized"))