Skip to content

Commit c516ef9

Browse files
committed
[IRGen] Remove unnecessary IRGenOptions flag HasUnderlyingModule.
The test that it's guarding is cheap enough to do all the time, and we don't have any interesting configurations where it's not set any more. Swift SVN r29442
1 parent c8bfc87 commit c516ef9

File tree

4 files changed

+5
-11
lines changed

4 files changed

+5
-11
lines changed

include/swift/AST/IRGenOptions.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,6 @@ class IRGenOptions {
9797

9898
/// Disable frame pointer elimination?
9999
unsigned DisableFPElim : 1;
100-
101-
/// Whether or not this is the Swift half of a mixed-source framework.
102-
unsigned HasUnderlyingModule : 1;
103100

104101
/// Special codegen for playgrounds.
105102
unsigned Playground : 1;
@@ -124,8 +121,8 @@ class IRGenOptions {
124121
Optimize(false), DebugInfoKind(IRGenDebugInfoKind::None),
125122
UseJIT(false), DisableLLVMOptzns(false),
126123
DisableLLVMARCOpts(false), DisableLLVMSLPVectorizer(false),
127-
DisableFPElim(true), HasUnderlyingModule(false),
128-
Playground(false), GenerateProfile(false),
124+
DisableFPElim(true), Playground(false),
125+
GenerateProfile(false),
129126
EmbedMode(IRGenEmbedMode::None) {}
130127

131128
/// Gets the name of the specified output filename.

lib/Frontend/CompilerInvocation.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1018,8 +1018,6 @@ static bool ParseIRGenArgs(IRGenOptions &Opts, ArgList &Args,
10181018
if (Args.hasArg(OPT_disable_llvm_verify))
10191019
Opts.Verify = false;
10201020

1021-
Opts.HasUnderlyingModule |= Args.hasArg(OPT_import_underlying_module);
1022-
10231021
if (Args.hasArg(OPT_autolink_force_load))
10241022
Opts.ForceLoadSymbolName = Args.getLastArgValue(OPT_module_link_name);
10251023

lib/IRGen/GenDecl.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -436,8 +436,7 @@ void IRGenModule::emitSourceFile(SourceFile &SF, unsigned StartElem) {
436436

437437
SF.forAllVisibleModules([&](swift::Module::ImportedModule import) {
438438
swift::Module *next = import.second;
439-
if (Opts.HasUnderlyingModule &&
440-
next->getName() == SF.getParentModule()->getName())
439+
if (next->getName() == SF.getParentModule()->getName())
441440
return;
442441

443442
next->collectLinkLibraries([this](LinkLibrary linkLib) {

lib/IRGen/IRGen.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -432,7 +432,7 @@ static std::unique_ptr<llvm::Module> performIRGeneration(IRGenOptions &Opts,
432432
continue;
433433
prev = next;
434434

435-
if (Opts.HasUnderlyingModule && next->getName() == M->getName())
435+
if (next->getName() == M->getName())
436436
continue;
437437

438438
next->collectLinkLibraries([&](LinkLibrary linkLib) {
@@ -566,7 +566,7 @@ static void performParallelIRGeneration(IRGenOptions &Opts,
566566
continue;
567567
prev = next;
568568

569-
if (Opts.HasUnderlyingModule && next->getName() == M->getName())
569+
if (next->getName() == M->getName())
570570
continue;
571571

572572
next->collectLinkLibraries([&](LinkLibrary linkLib) {

0 commit comments

Comments
 (0)