IRGen: don't proceed to IRGen if collecting linker directives failed

This commit is contained in:
Xi Ge
2020-01-22 16:22:29 -08:00
parent f254619f59
commit 366e24ed51
2 changed files with 25 additions and 0 deletions

View File

@@ -1609,6 +1609,9 @@ static bool performCompileStepsPostSILGen(
llvm::StringSet<> LinkerDirectives;
collectLinkerDirectives(Invocation, MSF, LinkerDirectives);
// Don't proceed to IRGen if collecting linker directives failed.
if (Context.hadError())
return true;
StringRef OutputFilename = PSPs.OutputFilename;
std::vector<std::string> ParallelOutputFilenames =
Invocation.getFrontendOptions().InputsAndOutputs.copyOutputFilenames();