Enhance VarPattern to capture a bit indicating whether the pattern was a var or let.

Previously we only used this information in the parser, but Sema needs to know as well.

NFC except in -dump-ast.



Swift SVN r25914
This commit is contained in:
Chris Lattner
2015-03-10 06:07:56 +00:00
parent 6423209466
commit db187f2183
8 changed files with 25 additions and 17 deletions

View File

@@ -51,7 +51,7 @@ const uint16_t VERSION_MAJOR = 0;
/// To ensure that two separate changes don't silently get merged into one
/// in source control, you should also update the comment to briefly
/// describe what change you made.
const uint16_t VERSION_MINOR = 177; // Last change: Flag for sib
const uint16_t VERSION_MINOR = 178; // Last change: VarPattern
using DeclID = Fixnum<31>;
using DeclIDField = BCFixed<31>;
@@ -1009,6 +1009,7 @@ namespace decls_block {
using VarPatternLayout = BCRecordLayout<
VAR_PATTERN,
BCFixed<1>, // isLet?
BCFixed<1> // implicit?
// The sub-pattern trails the record.
>;