mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Address Jordan’s comments:
- Also be consistent about has vs have for Input predicates Fix bug.
This commit is contained in:
@@ -542,7 +542,7 @@ static bool performCompile(CompilerInstance &Instance,
|
||||
auto &LLVMContext = getGlobalLLVMContext();
|
||||
|
||||
// Load in bitcode file.
|
||||
assert(Invocation.getFrontendOptions().Inputs.hasUniqueInputFilename() &&
|
||||
assert(Invocation.getFrontendOptions().Inputs.haveUniqueInputFilename() &&
|
||||
"We expect a single input for bitcode input!");
|
||||
llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> FileBufOrErr =
|
||||
llvm::MemoryBuffer::getFileOrSTDIN(
|
||||
@@ -780,7 +780,7 @@ static bool performCompile(CompilerInstance &Instance,
|
||||
if (opts.Inputs.haveAPrimaryInputFile()) {
|
||||
FileUnit *PrimaryFile = PrimarySourceFile;
|
||||
if (!PrimaryFile) {
|
||||
auto Index = opts.Inputs.getOptionalPrimaryInput()->Index;
|
||||
auto Index = opts.Inputs.getRequiredUniquePrimaryInput().Index;
|
||||
PrimaryFile = Instance.getMainModule()->getFiles()[Index];
|
||||
}
|
||||
astGuaranteedToCorrespondToSIL = !fileIsSIB(PrimaryFile);
|
||||
|
||||
Reference in New Issue
Block a user