[IRGen] Allow IRGenDescriptor to hold a FileUnit

This will allow it to better interact with the
SILGen descriptor.
This commit is contained in:
Hamish Knight
2020-07-15 16:46:41 -07:00
parent 949d400b0f
commit 45f11c8615
5 changed files with 26 additions and 25 deletions

View File

@@ -1508,7 +1508,7 @@ generateIR(const IRGenOptions &IRGenOpts, const TBDGenOptions &TBDOpts,
llvm::GlobalVariable *&HashGlobal,
ArrayRef<std::string> parallelOutputFilenames) {
if (auto *SF = MSF.dyn_cast<SourceFile *>()) {
return performIRGeneration(*SF, IRGenOpts, TBDOpts,
return performIRGeneration(SF, IRGenOpts, TBDOpts,
std::move(SM), OutputFilename, PSPs,
SF->getPrivateDiscriminator().str(),
&HashGlobal);