[AST] Add some ASTNode constructors for lldb

These seem to be needed to allow the conversion to
ASTNode in lldb.
This commit is contained in:
Hamish Knight
2024-01-31 10:23:53 +00:00
parent 27c08b130a
commit 5be3ef65d3

View File

@@ -50,6 +50,15 @@ namespace swift {
// Inherit the constructors from PointerUnion.
using PointerUnion::PointerUnion;
// These are needed for lldb.
ASTNode(Expr *E) : PointerUnion(E) {}
ASTNode(Stmt *S) : PointerUnion(S) {}
ASTNode(Decl *D) : PointerUnion(D) {}
ASTNode(Pattern *P) : PointerUnion(P) {}
ASTNode(TypeRepr *T) : PointerUnion(T) {}
ASTNode(StmtConditionElement *S) : PointerUnion(S) {}
ASTNode(CaseLabelItem *C) : PointerUnion(C) {}
SourceRange getSourceRange() const;
/// Return the location of the start of the statement.