Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions include/swift/AST/Expr.h
Original file line number Diff line number Diff line change
Expand Up @@ -696,9 +696,7 @@ class BuiltinLiteralExpr : public LiteralExpr {

/// Set the builtin initializer that will be used to construct the
/// literal.
void setBuiltinInitializer(ConcreteDeclRef builtinInitializer) {
BuiltinInitializer = builtinInitializer;
}
void setBuiltinInitializer(ConcreteDeclRef builtinInitializer);
};

/// The 'nil' literal.
Expand Down
9 changes: 8 additions & 1 deletion lib/AST/Expr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1089,7 +1089,14 @@ StringRef LiteralExpr::getLiteralKindDescription() const {
llvm_unreachable("Unhandled literal");
}

IntegerLiteralExpr * IntegerLiteralExpr::createFromUnsigned(ASTContext &C, unsigned value, SourceLoc loc) {
void BuiltinLiteralExpr::setBuiltinInitializer(
ConcreteDeclRef builtinInitializer) {
ASSERT(builtinInitializer);
BuiltinInitializer = builtinInitializer;
}

IntegerLiteralExpr * IntegerLiteralExpr::createFromUnsigned(
ASTContext &C, unsigned value, SourceLoc loc) {
llvm::SmallString<8> Scratch;
llvm::APInt(sizeof(unsigned)*8, value).toString(Scratch, 10, /*signed*/ false);
auto Text = C.AllocateCopy(StringRef(Scratch));
Expand Down