Transfer code gen option OpaquePointers to LLVMContext

This commit is contained in:
Arnold Schwaighofer
2022-09-22 10:49:04 -07:00
parent 1783e224b8
commit 92edb70e37
2 changed files with 9 additions and 0 deletions

View File

@@ -103,6 +103,9 @@ static clang::CodeGenerator *createClangCodeGenerator(ASTContext &Context,
auto &ClangContext = Importer->getClangASTContext();
auto &CGO = Importer->getClangCodeGenOpts();
if (CGO.OpaquePointers)
LLVMContext.setOpaquePointers(true);
CGO.OptimizationLevel = Opts.shouldOptimize() ? 3 : 0;
CGO.DebugTypeExtRefs = !Opts.DisableClangModuleSkeletonCUs;