From 8dfaecc4c24494337933aff9d9166486ca0949f1 Mon Sep 17 00:00:00 2001 From: Argyrios Kyrtzidis Date: Sat, 23 Jul 2022 00:11:44 -0700 Subject: [CGDebugInfo] Access the current working directory from the `VFS` ...instead of calling `llvm::sys::fs::current_path()` directly. Differential Revision: https://reviews.llvm.org/D130443 --- clang/lib/CodeGen/CodeGenModule.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'clang/lib/CodeGen/CodeGenModule.cpp') diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 918425bc4226..4e8e120d89df 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -96,16 +96,18 @@ static CGCXXABI *createCXXABI(CodeGenModule &CGM) { llvm_unreachable("invalid C++ ABI kind"); } -CodeGenModule::CodeGenModule(ASTContext &C, const HeaderSearchOptions &HSO, +CodeGenModule::CodeGenModule(ASTContext &C, + IntrusiveRefCntPtr FS, + const HeaderSearchOptions &HSO, const PreprocessorOptions &PPO, const CodeGenOptions &CGO, llvm::Module &M, DiagnosticsEngine &diags, CoverageSourceInfo *CoverageInfo) - : Context(C), LangOpts(C.getLangOpts()), HeaderSearchOpts(HSO), - PreprocessorOpts(PPO), CodeGenOpts(CGO), TheModule(M), Diags(diags), - Target(C.getTargetInfo()), ABI(createCXXABI(*this)), - VMContext(M.getContext()), Types(*this), VTables(*this), - SanitizerMD(new SanitizerMetadata(*this)) { + : Context(C), LangOpts(C.getLangOpts()), FS(std::move(FS)), + HeaderSearchOpts(HSO), PreprocessorOpts(PPO), CodeGenOpts(CGO), + TheModule(M), Diags(diags), Target(C.getTargetInfo()), + ABI(createCXXABI(*this)), VMContext(M.getContext()), Types(*this), + VTables(*this), SanitizerMD(new SanitizerMetadata(*this)) { // Initialize the type cache. llvm::LLVMContext &LLVMContext = M.getContext(); -- cgit v1.2.3