mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Merge pull request #22158 from pschuh/s-2
NilLiteralExpr now is lowered directly into SIL.
This commit is contained in:
@@ -711,6 +711,7 @@ public:
|
||||
///
|
||||
class NilLiteralExpr : public LiteralExpr {
|
||||
SourceLoc Loc;
|
||||
ConcreteDeclRef Initializer;
|
||||
public:
|
||||
NilLiteralExpr(SourceLoc Loc, bool Implicit = false)
|
||||
: LiteralExpr(ExprKind::NilLiteral, Implicit), Loc(Loc) {
|
||||
@@ -719,6 +720,15 @@ public:
|
||||
SourceRange getSourceRange() const {
|
||||
return Loc;
|
||||
}
|
||||
|
||||
/// Retrieve the initializer that will be used to construct the 'nil'
|
||||
/// literal from the result of the initializer.
|
||||
ConcreteDeclRef getInitializer() const { return Initializer; }
|
||||
|
||||
/// Set the initializer that will be used to construct the 'nil' literal.
|
||||
void setInitializer(ConcreteDeclRef initializer) {
|
||||
Initializer = initializer;
|
||||
}
|
||||
|
||||
static bool classof(const Expr *E) {
|
||||
return E->getKind() == ExprKind::NilLiteral;
|
||||
|
||||
Reference in New Issue
Block a user