|
| const Name & | getName () const |
| | Return the name of the constraint.
|
| MutableArrayRef< VariableDecl * > | getInputs () |
| | Return the input arguments of this constraint.
|
| ArrayRef< VariableDecl * > | getInputs () const |
| std::optional< StringRef > | getNativeInputType (unsigned index) const |
| | Return the explicit native type to use for the given input.
|
| MutableArrayRef< VariableDecl * > | getResults () |
| | Return the explicit results of the constraint declaration.
|
| ArrayRef< VariableDecl * > | getResults () const |
| std::optional< StringRef > | getCodeBlock () const |
| | Return the optional code block of this constraint, if this is a native constraint with a provided implementation.
|
| const CompoundStmt * | getBody () const |
| | Return the body of this constraint if this constraint is a PDLL constraint, otherwise returns nullptr.
|
| Type | getResultType () const |
| | Return the result type of this constraint.
|
| bool | isExternal () const |
| | Returns true if this constraint is external.
|
| const Name * | getName () const |
| | Return the name of the decl, or nullptr if it doesn't have one.
|
| void | setDocComment (Context &ctx, StringRef comment) |
| | Set the documentation comment for this decl.
|
| std::optional< StringRef > | getDocComment () const |
| | Return the documentation comment attached to this decl if it has been set.
|
| TypeID | getTypeID () const |
| | Return the type identifier of this node.
|
| SMRange | getLoc () const |
| | Return the location of this node.
|
| void | print (raw_ostream &os) const |
| | Print this node to the given stream.
|
| void | walk (function_ref< void(const Node *)> walkFn) const |
| | Walk all of the nodes including, and nested under, this node in pre-order.
|
| template<typename WalkFnT, typename ArgT = typename llvm::function_traits< WalkFnT>::template arg_t<0>> |
| std::enable_if_t<!std::is_convertible< const Node *, ArgT >::value > | walk (WalkFnT &&walkFn) const |
|
| static UserConstraintDecl * | createNative (Context &ctx, const Name &name, ArrayRef< VariableDecl * > inputs, ArrayRef< VariableDecl * > results, std::optional< StringRef > codeBlock, Type resultType, ArrayRef< StringRef > nativeInputTypes={}) |
| | Create a native constraint with the given optional code block.
|
| static UserConstraintDecl * | createPDLL (Context &ctx, const Name &name, ArrayRef< VariableDecl * > inputs, ArrayRef< VariableDecl * > results, const CompoundStmt *body, Type resultType) |
| | Create a PDLL constraint with the given body.
|
| static bool | classof (const Node *node) |
| | Provide type casting support.
|
| static bool | classof (const Node *node) |
| | Provide type casting support.
|
| static bool | classof (const Node *node) |
| | Provide type casting support.
|
This decl represents a user defined constraint.
This is either:
- an imported native constraint
- Similar to an external function declaration. This is a native constraint defined externally, and imported into PDLL via a declaration.
- a native constraint defined in PDLL
- This is a native constraint, i.e. a constraint whose implementation is defined in C++(or potentially some other non-PDLL language). The implementation of this constraint is specified as a string code block in PDLL.
- a PDLL constraint
- This is a constraint which is defined using only PDLL constructs.
Definition at line 886 of file Nodes.h.