We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 3ba267b + 7971f9e commit 2e58e5dCopy full SHA for 2e58e5d
lib/IRGen/GenDecl.cpp
@@ -79,6 +79,8 @@ bool IRGenerator::tryEnableLazyTypeMetadata(NominalTypeDecl *Nominal) {
79
// is not used by the program itself.
80
if (!Opts.shouldOptimize())
81
return false;
82
+ if (Opts.UseJIT)
83
+ return false;
84
85
switch (Nominal->getKind()) {
86
case DeclKind::Enum:
test/Interpreter/unused-type.swift
@@ -0,0 +1,17 @@
1
+// RUN: %target-jit-run -O %s | %FileCheck %s
2
+// REQUIRES: executable_test
3
+// REQUIRES: swift_interpreter
4
+
5
+// Check that when running the jit with -O we don't crash with an unresolved
6
+// metadata symbol.
7
8
+protocol Foo {
9
+ func foo() -> Int
10
+}
11
12
+struct Dummy: Foo {
13
+ func foo() -> Int { return 42 }
14
15
16
+// CHECK: ok
17
+print("ok")
0 commit comments