Skip to content

Commit 5be3ef6

Browse files
committed
[AST] Add some ASTNode constructors for lldb
These seem to be needed to allow the conversion to ASTNode in lldb.
1 parent 27c08b1 commit 5be3ef6

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

include/swift/AST/ASTNode.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,15 @@ namespace swift {
5050
// Inherit the constructors from PointerUnion.
5151
using PointerUnion::PointerUnion;
5252

53+
// These are needed for lldb.
54+
ASTNode(Expr *E) : PointerUnion(E) {}
55+
ASTNode(Stmt *S) : PointerUnion(S) {}
56+
ASTNode(Decl *D) : PointerUnion(D) {}
57+
ASTNode(Pattern *P) : PointerUnion(P) {}
58+
ASTNode(TypeRepr *T) : PointerUnion(T) {}
59+
ASTNode(StmtConditionElement *S) : PointerUnion(S) {}
60+
ASTNode(CaseLabelItem *C) : PointerUnion(C) {}
61+
5362
SourceRange getSourceRange() const;
5463

5564
/// Return the location of the start of the statement.

0 commit comments

Comments
 (0)