Commits

Jordan Rose committed 98717a2296b
Add -multi-file-output mode, which generates one object file per input file. SILGen, SIL passes, and IRGen have been factored out of main() into a helper function "performCompile", which is called separately for each input file. This will eventually be used to avoid rebuilding an entire target when a single file changes. Known issues: - @transparent functions are not inlined across file boundaries. <rdar://problem/15366167> - Some work and caches could definitely be shared between "compilations". - Unless all files use the same LLVMContext, we get crashes. <rdar://problem/15283227> - This mode is not compatible with -emit-module, so building a library still requires using single-file mode, or performing two invocations of swift. Eventually we'll have an AST-merging tool to combine the ASTs serialized into object files. <rdar://problem/15246467> But the long-term design is to have these separate compilations happen in separate cc1-like processes, so we shouldn't spend too much time optimizing this. Swift SVN r9889