mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
If type-checking in batch mode with no errors, don’t crash on outputting unneeded ObjCHeader.
This commit is contained in:
@@ -948,9 +948,13 @@ static bool performCompile(CompilerInstance &Instance,
|
||||
|
||||
// We've just been told to perform a typecheck, so we can return now.
|
||||
if (Action == FrontendOptions::ActionType::Typecheck) {
|
||||
const bool hadPrintAsObjCError = printAsObjCIfNeeded(
|
||||
Invocation.getObjCHeaderOutputPathForAtMostOnePrimary(),
|
||||
Instance.getMainModule(), opts.ImplicitObjCHeaderPath, moduleIsPublic);
|
||||
const bool hadPrintAsObjCError =
|
||||
Invocation.getFrontendOptions()
|
||||
.InputsAndOutputs.hasObjCHeaderOutputPath() &&
|
||||
printAsObjCIfNeeded(
|
||||
Invocation.getObjCHeaderOutputPathForAtMostOnePrimary(),
|
||||
Instance.getMainModule(), opts.ImplicitObjCHeaderPath,
|
||||
moduleIsPublic);
|
||||
|
||||
const bool hadEmitIndexDataError = emitIndexData(Invocation, Instance);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user