Commit Graph

13 Commits

Author SHA1 Message Date
Jordan Rose
111fb37f74 Remove swift::DoAtScopeExit in favor of llvm::make_scope_exit (#27113)
Keep the SWIFT_DEFER macro, though, which is what everyone in the
Swift codebase actually uses. No functionality change.
2019-09-10 18:30:30 -07:00
Jordan Rose
b20882b07d Fix horrible sneaky use-of-temporary-after-destruction in SWIFT_DEFER. (#7851)
Caught by ASan's new use-after-scope checking!
2017-03-01 16:19:11 -08:00
practicalswift
6d1ae2a39c [gardening] 2016 → 2017 2017-01-06 16:41:22 +01:00
practicalswift
797b80765f [gardening] Use the correct base URL (https://swift.org) in references to the Swift website
Remove all references to the old non-TLS enabled base URL (http://swift.org)
2016-11-20 17:36:03 +01:00
Ben Langmuir
ea848aeaae 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.
2016-06-29 14:57:58 -07:00
Dan Raviv
29d76f3b68 Canonize swift header files headers and footers
- Added missing ifdef guard in PointerIntEnum header
- Consistent naming convention for ifdef guards
- Consistent 'end namespace swift'
- Consistent single EOL at end of header files
2016-03-23 09:04:12 +02:00
Ben Langmuir
d12f1f0665 [ASTPrinter] Funnel keyword printing through a common interface NFC
Start threading all keyword (and contextual keyword) printing through
printName, and add a new PrintNameContext for keywords.  For now we just
pass this through without changing behaviour.

Also add an operator<< for printing from the tok:: kind for keywords,
which makes it much more convenient for performing the required
callbacks.

rdar://problem/24292226
2016-03-02 16:46:25 -08:00
practicalswift
1339b5403b Consistent use of header comment format.
Correct format:
//===--- Name of file - Description ----------------------------*- Lang -*-===//
2016-01-04 13:26:31 +01:00
Zach Panzarino
e3a4147ac9 Update copyright date 2015-12-31 23:28:40 +00:00
practicalswift
021a186c23 Fix typos. 2015-12-28 18:30:15 +01:00
Bartosz Przybylski
0e5c7ddfb8 Make c++ defer looks like a swift one 2015-12-04 11:03:39 +01:00
Chris Lattner
0d5bdd3774 Replace the SCOPE_GUARD macro with uses of the defer() macro, and merge Doug's
"performance optimizations" into defer :-)



Swift SVN r26410
2015-03-22 05:55:19 +00:00
Chris Lattner
00ebd4a9a4 factor a helper out to a simple "defer" macro, NFC.
Swift SVN r26232
2015-03-17 20:42:03 +00:00