aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <kyrtzidis@apple.com>2022-07-23 00:11:44 -0700
committerArgyrios Kyrtzidis <kyrtzidis@apple.com>2022-07-26 13:48:39 -0700
commit8dfaecc4c24494337933aff9d9166486ca0949f1 (patch)
tree49d5a2db87bc471fdd6c2831e5cfd686287b815a /clang/lib/CodeGen/CodeGenModule.cpp
parent0734c02b34e49568d278dce7ca4b818fc465853d (diff)
downloadllvm-8dfaecc4c24494337933aff9d9166486ca0949f1.zip
llvm-8dfaecc4c24494337933aff9d9166486ca0949f1.tar.gz
llvm-8dfaecc4c24494337933aff9d9166486ca0949f1.tar.bz2
[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
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index 918425b..4e8e120d 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<llvm::vfs::FileSystem> 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();