Skip to content

Commit 104a568

Browse files
author
Harlan Haskins
committed
[TBDGen] Skip non-inlinable function bodies in InstallAPI
For now, until we figure out the right way to present -experimental-skip-non-inlinable-function-bodies, make -tbd-is-installapi imply that, for testing.
1 parent ad8a611 commit 104a568

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

lib/Frontend/ArgsToFrontendOptionsConverter.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -228,6 +228,12 @@ void ArgsToFrontendOptionsConverter::computeDebugTimeOptions() {
228228
Opts.DebugTimeCompilation |= Args.hasArg(OPT_debug_time_compilation);
229229
Opts.SkipNonInlinableFunctionBodies |=
230230
Args.hasArg(OPT_experimental_skip_non_inlinable_function_bodies);
231+
232+
// If asked to perform InstallAPI, go ahead and enable non-inlinable function
233+
// body skipping.
234+
Opts.SkipNonInlinableFunctionBodies |=
235+
Args.hasArg(OPT_tbd_is_installapi);
236+
231237
if (const Arg *A = Args.getLastArg(OPT_stats_output_dir)) {
232238
Opts.StatsOutputDir = A->getValue();
233239
if (Args.getLastArg(OPT_trace_stats_events)) {

test/TBD/installapi-flag.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33

44
// 1. Emit two TBDs, one with -tbd-is-installapi set, and one without
55

6-
// RUN: %target-swift-frontend -emit-ir -o /dev/null %s -tbd-is-installapi -emit-tbd -emit-tbd-path %t/flag-provided.tbd
7-
// RUN: %target-swift-frontend -emit-ir -o /dev/null %s -emit-tbd -emit-tbd-path %t/flag-omitted.tbd
6+
// RUN: %target-swift-frontend -typecheck %s -tbd-is-installapi -emit-tbd -emit-tbd-path %t/flag-provided.tbd
7+
// RUN: %target-swift-frontend -typecheck %s -emit-tbd -emit-tbd-path %t/flag-omitted.tbd
88

99
// 2. Ensure that the file with -tbd-is-installapi passed includes the installapi flag
1010

0 commit comments

Comments
 (0)