Commit Graph

64 Commits

Author SHA1 Message Date
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
6cf30215ae Added support for specifying the terminator used by Command::printCommandLine.
This defaults to "\n", so this is NFC for existing clients.

Swift SVN r20848
2014-07-31 21:19:56 +00:00
Jordan Rose
69533b53f7 [Driver] Invoke dsymutil after linking when invoked with -g.
This matches Clang's behavior, though this implementation does not check
that it's actually on a platform that uses dsymutil.

<rdar://problem/16012971>

Swift SVN r20529
2014-07-25 01:31:40 +00:00
Jordan Rose
3bebef4d29 Pass options to LLDB's REPL.
This is the rest of <rdar://problem/16776705>

Swift SVN r17820
2014-05-10 01:17:39 +00:00
Nadav Rotem
6a0f2cfcb8 remove more extra semicolons to clean up warnings.
Swift SVN r15486
2014-03-26 05:44:41 +00:00
Connor Wakamo
49d8d07224 [driver] Moved Command printing into Command::printCommandLine().
This was previously implemented in both Compilation::performJobsInList() and printJob().

Swift SVN r13253
2014-02-01 00:22:41 +00:00
Jordan Rose
c101e360a9 [driver] Use "const std::string &" instead of StringRef.
…for strings required to be null-terminated.

Swift SVN r12790
2014-01-22 21:56:24 +00:00
Connor Wakamo
4a79769742 [driver] Make CommandOutput::BaseInput into a bare StringRef, treating an empty reference as no value.
Swift SVN r12607
2014-01-20 19:26:50 +00:00
Connor Wakamo
5f00a5b1a9 [driver] Adjusted CommandOutput so that BaseInput is an Optional<StringRef>.
Not all Commands will have a base input (REPL commands, in particular), so make
BaseInput optional.

Swift SVN r12546
2014-01-18 20:55:20 +00:00
Connor Wakamo
824c0cb126 [driver] Reworked the CommandOutput class to add support for specifying additional outputs.
This will allow the driver to specify the location for, among other things, the partial swiftmodule generated by a single frontend invocation.

Swift SVN r12449
2014-01-17 01:11:55 +00:00
Connor Wakamo
24fad265a2 [driver] Removed Job::run() and Job::needsToRun().
Both of these functions are now handled by Compilation.

Swift SVN r12061
2014-01-08 19:10:43 +00:00
Connor Wakamo
ab7fcaecc3 [driver] Make Command::getExecutable() return a const char *, since a Command’s executable must always be a null-terminated C string.
Swift SVN r11426
2013-12-18 18:06:04 +00:00
Connor Wakamo
25283a28d9 [driver] Fixed an issue where creating Commands with no output failed due to an attempt to initialize a StringRef with nullptr.
Swift SVN r11324
2013-12-15 00:58:26 +00:00
Connor Wakamo
ed2038585f Initial set of changes to add a new 'swift_driver' executable.
- Added a couple of new targets:
  - libswiftDriver, which contains most of the driver implementation
  - swift_driver, which produces the actual executable

- Added centralized version information into libswiftBasic.

- Added a new "Driver Design & Internals" document, which currently describes
  the high-level design of the Swift driver.

- Implemented an early version of the functionality of the driver, including
  versions of the Parse, Pipeline, Bind, Translate, and Execute driver stages.
  Parse, Pipeline, and Bind are largely implemented; Translate and Execute are
  early placeholders. (Translate produces "swift_driver --version" and "ld -v"
  commands, while Execute performs all subtasks sequentially, rather than in
  parallel.)

This is just the starting point for the Swift driver. Tests for the existing
behavior are forthcoming.

Swift SVN r10933
2013-12-06 21:23:01 +00:00