Skip to content

Commit c2716e4

Browse files
authored
Merge pull request #71270 from hamishknight/ast-for-lldb
[AST] Add some ASTNode constructors for lldb
2 parents 76c9585 + 5be3ef6 commit c2716e4

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)