The TableGen emitter for directives has two slots for flangClass information and this was mainly
to be able to keep up with the legacy openmp parser at the time. Now that all clauses are encapsulated in
AccClause or OmpClause, these two strings are not necessary anymore and were the the source of couple
of problem while working with the generic structure checker for OpenMP.
This patch remove the flangClassValue string from DirectiveBase.td and use the string flangClass as the
placeholder for the encapsulated class.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
This was a much needed change. Thank you for the refactoring.
One of the typical and most common problems was FindClause did not work as expected given that CheckAllowed was correctly defined for the clauses.
I see tests failing defined with the target mentioned inline.
llvm/test/TableGen/directive2.td | ||
---|---|---|
17 | Did you check with the target check-llvm-tablegen ? |
llvm/test/TableGen/directive2.td | ||
---|---|---|
17 | I did it but will double-check. |
llvm/test/TableGen/directive2.td | ||
---|---|---|
17 | All tests are passing on my side. What kind of error are you seeing? |
llvm/test/TableGen/directive2.td | ||
---|---|---|
17 | Command Output (stderr): -- directive2.td:17:1: error: Record `TDLC_ClauseA' does not have a field named `flangClassValue'! def TDLC_ClauseA : Clause<"clausea"> { ^ FileCheck error: '<stdin>' is empty. FileCheck command line: /home/amd/f18_git/final_test/driver_build/bin/FileCheck -match-full-lines /home/amd/f18_git/final_test/llvm-project/llvm/test/TableGen/directive2.td -check-prefix=GEN and for directive1.td. Command Output (stderr): -- /home/amd/f18_git/final_test/llvm-project/llvm/test/TableGen/directive1.td:97:16: error: CHECK-NEXT: expected string not found in input // CHECK-NEXT: llvm::StringRef getTdlAKindName(AKind); I even rebased on main . |
Ok a clang version 8.0.1 based build passes.
It's seems compiler version related issue.
BTW, is there a way to mitigate or conform such compiler version/build related issues?
LGTM.
Did you check with the target check-llvm-tablegen ?