mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Factor code from tools & move input conversion.
This commit is contained in:
@@ -780,7 +780,7 @@ static bool performCompile(CompilerInstance &Instance,
|
||||
if (opts.Inputs.haveAPrimaryInputFile()) {
|
||||
FileUnit *PrimaryFile = PrimarySourceFile;
|
||||
if (!PrimaryFile) {
|
||||
auto Index = opts.Inputs.getPrimaryInput().getValue().Index;
|
||||
auto Index = opts.Inputs.getOptionalPrimaryInput()->Index;
|
||||
PrimaryFile = Instance.getMainModule()->getFiles()[Index];
|
||||
}
|
||||
astGuaranteedToCorrespondToSIL = !fileIsSIB(PrimaryFile);
|
||||
|
||||
Reference in New Issue
Block a user