Skip to content

Commit b3ddbe4

Browse files
author
David Ungar
committed
Small fixups
1 parent 974933c commit b3ddbe4

File tree

2 files changed

+4
-11
lines changed

2 files changed

+4
-11
lines changed

Diff for: lib/Frontend/Frontend.cpp

-6
Original file line numberDiff line numberDiff line change
@@ -196,12 +196,6 @@ bool CompilerInstance::setUpInputs() {
196196
recordPrimaryInputBuffer(*codeCompletionBufferID);
197197
}
198198

199-
// Remove this check when batch mode is (starting to) work.
200-
if (PrimaryBufferID != NO_SUCH_BUFFER)
201-
Invocation.getFrontendOptions()
202-
.InputsAndOutputs
203-
.assertMustNotBeMoreThanOnePrimaryInput(); // not impl yet
204-
205199
if (isInputSwift() && MainBufferID == NO_SUCH_BUFFER &&
206200
InputSourceCodeBufferIDs.size() == 1)
207201
MainBufferID = InputSourceCodeBufferIDs.front();

Diff for: lib/FrontendTool/FrontendTool.cpp

+4-5
Original file line numberDiff line numberDiff line change
@@ -1124,11 +1124,10 @@ static bool performCompileStepsPostSILGen(CompilerInstance &Instance,
11241124
std::unique_ptr<llvm::Module> IRModule;
11251125
llvm::GlobalVariable *HashGlobal;
11261126
if (MSF.is<SourceFile*>()) {
1127-
IRModule = performIRGeneration(IRGenOpts,
1128-
*MSF.get<SourceFile*>(),
1129-
std::move(SM),
1130-
opts.InputsAndOutputs.preBatchModeGetSingleOutputFilename()(), LLVMContext,
1131-
0, &HashGlobal);
1127+
IRModule = performIRGeneration(
1128+
IRGenOpts, *MSF.get<SourceFile *>(), std::move(SM),
1129+
opts.InputsAndOutputs.preBatchModeGetSingleOutputFilename(),
1130+
LLVMContext, 0, &HashGlobal);
11321131
} else {
11331132
IRModule = performIRGeneration(IRGenOpts, MSF.get<ModuleDecl*>(),
11341133
std::move(SM),

0 commit comments

Comments
 (0)