Rename C++ macro 'defer' -> 'SWIFT_DEFER'

In C++ we can't have nice things. The macro name 'defer' collided with
use of 'defer' in the Tokens.def file and we were already doing horrible
workarounds in a couple of places to allow them to be included into the
same file. So use a less awesome but more robust name (thanks to Joe for
suggesting SWIFT_DEFER).

Incidentally, sort a bunch of #inlcudes.
This commit is contained in:
Ben Langmuir
2016-06-29 14:49:34 -07:00
parent c30286add0
commit ea848aeaae
13 changed files with 55 additions and 56 deletions

View File

@@ -4073,7 +4073,7 @@ ParserStatus Parser::parseDeclVar(ParseDeclOptions Flags,
// No matter what error path we take, make sure the
// PatternBindingDecl/TopLevel code block are added.
defer {
SWIFT_DEFER {
// If we didn't parse any patterns, don't create the pattern binding decl.
if (PBDEntries.empty())
return;