1 // RUN: not llvm-tblgen -gen-directive-decl -I %p/../../include %s 2>&1 | FileCheck -match-full-lines %s
2 // RUN: not llvm-tblgen -gen-directive-impl -I %p/../../include %s 2>&1 | FileCheck -match-full-lines %s
4 include "llvm/Frontend/Directive/DirectiveBase.td"
6 def TestDirectiveLanguage : DirectiveLanguage {
10 def TDLC_ClauseA : Clause<"clausea"> {
14 def TDLC_ClauseB : Clause<"clauseb"> {
17 def TDLC_ClauseC : Clause<"clausec"> {
20 def TDLC_ClauseD : Clause<"claused"> {
23 def TDL_DirA : Directive<"dira"> {
24 let allowedClauses = [
25 VersionedClause<TDLC_ClauseA>,
26 VersionedClause<TDLC_ClauseB>,
27 VersionedClause<TDLC_ClauseD>
29 let allowedOnceClauses = [
30 VersionedClause<TDLC_ClauseA>,
31 VersionedClause<TDLC_ClauseC>
33 let requiredClauses = [
34 VersionedClause<TDLC_ClauseC>,
35 VersionedClause<TDLC_ClauseD>
40 // CHECK: error: Clause TDLC_ClauseA already defined on directive TDL_DirA
41 // CHECK: error: Clause TDLC_ClauseD already defined on directive TDL_DirA
42 // CHECK: error: One or more clauses are defined multiple times on directive TDL_DirA