File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -558,6 +558,10 @@ bool SILFunction::hasNonUniqueDefinition() const {
558
558
if (!getASTContext ().LangOpts .hasFeature (Feature::Embedded))
559
559
return false ;
560
560
561
+ // If this function is the entrypoint, it is unique.
562
+ if (getName () == getASTContext ().getEntryPointFunctionName ())
563
+ return false ;
564
+
561
565
// If this is for a declaration, ask it.
562
566
if (auto declRef = getDeclRef ()) {
563
567
return declRef.hasNonUniqueDefinition ();
Original file line number Diff line number Diff line change 56
56
// RUN: %target-run %t/Application | %FileCheck %s
57
57
58
58
// Test #%: All "intermediate", all the time. Main drives code generation
59
- // TODO: @main needs to drive the generation of code here.
60
59
// RUN: %target-swift-frontend -c -emit-module -o %t/Root.o %t/Root.swift -enable-experimental-feature Embedded -enable-experimental-feature DeferredCodeGen -parse-as-library
61
60
// RUN: %target-swift-frontend -c -I %t -emit-module -o %t/ClientA.o %t/ClientA.swift -enable-experimental-feature Embedded -enable-experimental-feature DeferredCodeGen -parse-as-library
62
61
// RUN: %target-swift-frontend -c -I %t -emit-module -o %t/ClientB.o %t/ClientB.swift -enable-experimental-feature Embedded -enable-experimental-feature DeferredCodeGen -parse-as-library
63
62
// RUN: %target-swift-frontend -c -I %t -emit-module -o %t/Application.o %t/Application.swift -enable-experimental-feature Embedded -enable-experimental-feature DeferredCodeGen -parse-as-library
64
- // RUN-TODO : %target-clang %target-clang-resource-dir-opt %t/Root.o %t/ClientA.o %t/ClientB.o %t/Application.o -o %t/Application
65
- // RUN-TODO : %target-run %t/Application | %FileCheck %s
63
+ // RUN: %target-clang %target-clang-resource-dir-opt %t/Root.o %t/ClientA.o %t/ClientB.o %t/Application.o -o %t/Application
64
+ // RUN: %target-run %t/Application | %FileCheck %s
66
65
67
66
68
67
// REQUIRES: swift_in_compiler
You can’t perform that action at this time.
0 commit comments