Don't crash the frontend if a bad target is given

Provide a chance to emit a diagnostic instead.

rdar://problem/20931800

Swift SVN r28940
This commit is contained in:
David Farler
2015-05-23 00:58:05 +00:00
parent 7d881f8440
commit 5dbc33f8ac
5 changed files with 49 additions and 8 deletions

View File

@@ -146,7 +146,10 @@ namespace swift {
/// Sets the target we are building for and updates configuration options
/// to match.
void setTarget(llvm::Triple triple);
///
/// \returns A pair - the first element is true if the OS was invalid.
/// The second element is true if the Arch was invalid.
std::pair<bool, bool> setTarget(llvm::Triple triple);
/// Returns the minimum platform version to which code will be deployed.
///