Commit Graph

5 Commits

Author SHA1 Message Date
practicalswift
db13bcb22e Fix typos. 2015-12-26 14:11:42 +01:00
Arsen Gasparyan
be738abb7c Fix else code style 2015-12-22 11:13:26 +03:00
Ge Sen
7ac02d54ba Erase redundant whitespaces. 2015-12-10 13:35:06 +08:00
Jordan Rose
3fcdfd40e9 Remove the "swift/Basic/Optional.h" header.
llvm::Optional lives in "llvm/ADT/Optional.h". Like Clang, we can get
Optional in the 'swift' namespace by including "swift/Basic/LLVM.h".

We're now fully switched over to llvm::Optional!

Swift SVN r22477
2014-10-02 18:51:45 +00:00
Connor Wakamo
a69eb17411 [json] Added a basic JSON serialization class in swiftBasic.
The swift::json namespace now contains an Output class, which largely mirrors
llvm::yaml::Output. It takes the same approach where there are various traits
structs which dictate how a particular type is output in JSON. (This is separate
from llvm::yaml because, while all JSON is valid YAML, not all YAML is valid
JSON, and customization on how scalar types are output as JSON is necessary.)

Unlike llvm::yaml, there is no equivalent Input class. Since JSON is valid YAML,
llvm::yaml::Input can be used instead.

At some point, the traits structs could likely be merged with llvm::yaml (with
some ability to customize how scalars are output if it's outputting JSON instead
of YAML), but this provides enough of a starting point to allow the driver to
generate parseable output in JSON format.

Part of <rdar://problem/15958329>.

Swift SVN r20870
2014-08-01 01:15:35 +00:00