mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Added a new API, swift::driver::createCompilerInvocation. This takes an array of driver arguments, constructs a Driver and a Compilation, and then uses the Compilation's frontend arguments to create a CompilerInvocation. This works by forcing Driver to create a Compilation which contains a single compile command. (It achieves this by passing "-force-single-frontend-invocation" after all other arguments.) This approach roughly matches Clang's clang::createInvocationFromCommandLine. As implied by the namespacing, this lives in swiftDriver. As a result, swiftDriver now depends on swiftFrontend. In support of this, added a couple of driver diagnostics for exceptional error cases (where Driver produced something other than a single Command, or if that Command is not a frontend command). This fixes <rdar://problem/16125395>. Swift SVN r20972
1.5 KiB
1.5 KiB