Commit Graph

1457 Commits

Author SHA1 Message Date
Jordan Rose
1d2dfdb498 [serialization] Push record layout info into a private header.
The reader and writer will need to share this information, but there's no
reason anyone else will need it.

Swift SVN r5133
2013-05-09 22:58:07 +00:00
Jordan Rose
566e9c9ced [serialization] Don't repeat the record code after the layout declaration.
Also, add some static_asserts to diagnose misuse of BCRecordLayout.

No functionality change.

Swift SVN r5132
2013-05-09 22:58:05 +00:00
Jordan Rose
73b6269484 [serialization] Add a trivial Swift module loader.
Currently, the Swift module loader just looks for a .sm file, verifies the
signature "SMod", and produces an empty DeclContext.

Swift SVN r5126
2013-05-09 20:49:29 +00:00
Jordan Rose
5be5607a0f [serialization] Write a BLOCKINFO block so llvm-bcanalyzer is useful.
This adds names to the other blocks and records in the file.

The tests now require llvm-bcanalyzer to run; please build that along
with 'FileCheck' and 'not'.

Swift SVN r5109
2013-05-09 00:19:10 +00:00
Jordan Rose
476c4d4f48 [serialization] -emit-module: write out input file paths.
Eventually this will include both modules and source files that the
emitted module depends on, but for now it's just going to be used for
testing purposes to forward to normal source loaders.

Swift SVN r5108
2013-05-09 00:19:09 +00:00
Jordan Rose
c8ecd0ba25 [serialization] Add a metaprogramming system for bitcode record layout.
Alternately, "add a system of ridiculous overkill for bitcode record layout",
in the spirit of DRY over YAGNI. It /is/ much more concise than the LLVM way.

Use this to emit a sketch of Clang's PCH control block, although nothing's in
there yet besides "version 1.0" and the LLVM revision number; the latter is
more "proof of concept" than actually useful. We should figure out a good
way to identify trunk Swift compilers; this shouldn't be difficult.

Swift SVN r5107
2013-05-08 23:29:52 +00:00
Jordan Rose
5e5172fcf3 Add a skeleton for the Serialization library and -emit-module driver action.
WIP, doesn't do anything useful yet.

Swift SVN r5106
2013-05-08 23:29:51 +00:00