New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#if targetEnvironment(simulator) #12964

Merged
merged 4 commits into from Nov 29, 2017

Conversation

Projects
None yet
6 participants
@graydon
Contributor

graydon commented Nov 16, 2017

This is an implementation of apple/swift-evolution#764 which has now been accepted. It is ready to merge.

@graydon graydon requested review from DougGregor and bob-wilson Nov 16, 2017

@graydon

This comment has been minimized.

Show comment
Hide comment
@graydon

graydon Nov 16, 2017

Contributor

@swift-ci please test

Contributor

graydon commented Nov 16, 2017

@swift-ci please test

@DougGregor

This looks fantastic, thank you @graydon

Show outdated Hide outdated include/swift/AST/DiagnosticsParse.def
@@ -254,6 +262,13 @@ std::pair<bool, bool> LangOptions::setTarget(llvm::Triple triple) {
else
addPlatformConditionValue(PlatformConditionKind::Runtime, "_Native");
// Set the "targetEnvironment" platform condition if targeting a simulator
// environmet. Otherwise _no_ value is present for targetEnvironment; it's

This comment has been minimized.

@DougGregor

DougGregor Nov 17, 2017

Member

Typo environmet

@DougGregor

DougGregor Nov 17, 2017

Member

Typo environmet

@graydon graydon changed the title from [DO NOT MERGE] #if targetEnvironment(simulator) to #if targetEnvironment(simulator) Nov 28, 2017

@graydon

This comment has been minimized.

Show comment
Hide comment
@graydon

graydon Nov 28, 2017

Contributor

@swift-ci please test

Contributor

graydon commented Nov 28, 2017

@swift-ci please test

@swift-ci

This comment has been minimized.

Show comment
Hide comment
@swift-ci

swift-ci Nov 28, 2017

Contributor

Build failed
Swift Test Linux Platform
Git Sha - 81cc50b181e2874816d0c1f7eac3bb69b70c417e

Contributor

swift-ci commented Nov 28, 2017

Build failed
Swift Test Linux Platform
Git Sha - 81cc50b181e2874816d0c1f7eac3bb69b70c417e

@swift-ci

This comment has been minimized.

Show comment
Hide comment
@swift-ci

swift-ci Nov 29, 2017

Contributor

Build failed
Swift Test OS X Platform
Git Sha - 81cc50b181e2874816d0c1f7eac3bb69b70c417e

Contributor

swift-ci commented Nov 29, 2017

Build failed
Swift Test OS X Platform
Git Sha - 81cc50b181e2874816d0c1f7eac3bb69b70c417e

@tkremenek tkremenek merged commit e04c7fd into apple:master Nov 29, 2017

4 checks passed

Swift Test Linux Platform 10584 tests run, 0 skipped, 0 failed.
Details
Swift Test Linux Platform (smoke test)
Details
Swift Test OS X Platform 53040 tests run, 0 skipped, 0 failed.
Details
Swift Test OS X Platform (smoke test)
Details
/// Get the identifier string from an \c Expr if it's an
/// \c UnresolvedDeclRefExpr, otherwise the empty string.
static StringRef getDeclRefStr(Expr *E) {
if (auto *UDRE = cast<UnresolvedDeclRefExpr>(E)) {

This comment has been minimized.

@compnerd

compnerd Nov 29, 2017

Collaborator

Am I just mistaken, or shouldn't this be a dyn_cast? cast implies that this must succeed and will abort if the expression type is not a UnresolvedDeclRefExpr.

@compnerd

compnerd Nov 29, 2017

Collaborator

Am I just mistaken, or shouldn't this be a dyn_cast? cast implies that this must succeed and will abort if the expression type is not a UnresolvedDeclRefExpr.

This comment has been minimized.

@graydon

graydon Nov 29, 2017

Contributor

Oh, yes, this is a typo, thanks! Will fix tomorrow.

@graydon

graydon Nov 29, 2017

Contributor

Oh, yes, this is a typo, thanks! Will fix tomorrow.

graydon added a commit to graydon/swift that referenced this pull request Nov 29, 2017

@billThePill

This comment has been minimized.

Show comment
Hide comment
@billThePill

billThePill Feb 24, 2018

I notice a misspelling of platform (currently plaform) in this warning

billThePill commented on 94988a2 Feb 24, 2018

I notice a misspelling of platform (currently plaform) in this warning

This comment has been minimized.

Show comment
Hide comment
@graydon

graydon Feb 26, 2018

Contributor

@billThePill thanks! PR #14830 fixes it.

Contributor

graydon replied Feb 26, 2018

@billThePill thanks! PR #14830 fixes it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment