Skip to content

Commit c70ac39

Browse files
authored
Merge pull request #38641 from apple/add-pretty-line
[Frontend] Always output the version being compiled for
2 parents 5a4a323 + 12018be commit c70ac39

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

lib/FrontendTool/FrontendTool.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1969,6 +1969,8 @@ class PrettyStackTraceFrontend : public llvm::PrettyStackTraceEntry {
19691969
auto effective = LangOpts.EffectiveLanguageVersion;
19701970
if (effective != version::Version::getCurrentLanguageVersion()) {
19711971
os << "Compiling with effective version " << effective;
1972+
} else {
1973+
os << "Compiling with the current language version";
19721974
}
19731975
os << "\n";
19741976
};

test/Frontend/crash.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@
1616
// CHECK-ALLOW: Program arguments: {{.*}} -experimental-allow-module-with-compiler-errors
1717
// CHECK-ALLOW: Compiling with effective version
1818

19+
// RUN: not --crash %target-swift-frontend -typecheck -debug-crash-after-parse -experimental-allow-module-with-compiler-errors -swift-version 5 %s 2>&1 | %FileCheck -check-prefix CHECK-CURRENT %s
20+
// CHECK-CURRENT: Program arguments: {{.*}} -experimental-allow-module-with-compiler-errors
21+
// CHECK-CURRENT: Compiling with the current language version
22+
1923
func anchor() {}
2024
anchor()
2125

0 commit comments

Comments
 (0)