@@ -206,9 +206,10 @@ class EmitAssemblyHelper {
206206 }
207207
208208public:
209- EmitAssemblyHelper (CompilerInstance &CI, llvm::Module *M,
209+ EmitAssemblyHelper (CompilerInstance &CI, CodeGenOptions &CGOpts,
210+ llvm::Module *M,
210211 IntrusiveRefCntPtr<llvm::vfs::FileSystem> VFS)
211- : CI(CI), Diags(CI.getDiagnostics()), CodeGenOpts(CI.getCodeGenOpts() ),
212+ : CI(CI), Diags(CI.getDiagnostics()), CodeGenOpts(CGOpts ),
212213 TargetOpts (CI.getTargetOpts()), LangOpts(CI.getLangOpts()),
213214 TheModule(M), VFS(std::move(VFS)),
214215 TargetTriple(TheModule->getTargetTriple ()) {}
@@ -1364,14 +1365,14 @@ runThinLTOBackend(CompilerInstance &CI, ModuleSummaryIndex *CombinedIndex,
13641365 }
13651366}
13661367
1367- void clang::emitBackendOutput (CompilerInstance &CI, StringRef TDesc,
1368- llvm::Module *M, BackendAction Action,
1368+ void clang::emitBackendOutput (CompilerInstance &CI, CodeGenOptions &CGOpts,
1369+ StringRef TDesc, llvm::Module *M,
1370+ BackendAction Action,
13691371 IntrusiveRefCntPtr<llvm::vfs::FileSystem> VFS,
13701372 std::unique_ptr<raw_pwrite_stream> OS,
13711373 BackendConsumer *BC) {
13721374 llvm::TimeTraceScope TimeScope (" Backend" );
13731375 DiagnosticsEngine &Diags = CI.getDiagnostics ();
1374- const auto &CGOpts = CI.getCodeGenOpts ();
13751376
13761377 std::unique_ptr<llvm::Module> EmptyModule;
13771378 if (!CGOpts.ThinLTOIndexFile .empty ()) {
@@ -1411,7 +1412,7 @@ void clang::emitBackendOutput(CompilerInstance &CI, StringRef TDesc,
14111412 }
14121413 }
14131414
1414- EmitAssemblyHelper AsmHelper (CI, M, VFS);
1415+ EmitAssemblyHelper AsmHelper (CI, CGOpts, M, VFS);
14151416 AsmHelper.emitAssembly (Action, std::move (OS), BC);
14161417
14171418 // Verify clang's TargetInfo DataLayout against the LLVM TargetMachine's
0 commit comments