diff options
author | Argyrios Kyrtzidis <kyrtzidis@apple.com> | 2022-07-23 00:11:44 -0700 |
---|---|---|
committer | Argyrios Kyrtzidis <kyrtzidis@apple.com> | 2022-07-26 13:48:39 -0700 |
commit | 8dfaecc4c24494337933aff9d9166486ca0949f1 (patch) | |
tree | 49d5a2db87bc471fdd6c2831e5cfd686287b815a /clang/lib/CodeGen/CodeGenModule.h | |
parent | 0734c02b34e49568d278dce7ca4b818fc465853d (diff) | |
download | llvm-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.h')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.h b/clang/lib/CodeGen/CodeGenModule.h index c939e7a..5fbcc5a 100644 --- a/clang/lib/CodeGen/CodeGenModule.h +++ b/clang/lib/CodeGen/CodeGenModule.h @@ -47,6 +47,10 @@ class DataLayout; class FunctionType; class LLVMContext; class IndexedInstrProfReader; + +namespace vfs { +class FileSystem; +} } namespace clang { @@ -293,6 +297,7 @@ public: private: ASTContext &Context; const LangOptions &LangOpts; + IntrusiveRefCntPtr<llvm::vfs::FileSystem> FS; // Only used for debug info. const HeaderSearchOptions &HeaderSearchOpts; // Only used for debug info. const PreprocessorOptions &PreprocessorOpts; // Only used for debug info. const CodeGenOptions &CodeGenOpts; @@ -584,7 +589,8 @@ private: llvm::DenseMap<const llvm::Constant *, llvm::GlobalVariable *> RTTIProxyMap; public: - CodeGenModule(ASTContext &C, const HeaderSearchOptions &headersearchopts, + CodeGenModule(ASTContext &C, IntrusiveRefCntPtr<llvm::vfs::FileSystem> FS, + const HeaderSearchOptions &headersearchopts, const PreprocessorOptions &ppopts, const CodeGenOptions &CodeGenOpts, llvm::Module &M, DiagnosticsEngine &Diags, @@ -712,6 +718,9 @@ public: ASTContext &getContext() const { return Context; } const LangOptions &getLangOpts() const { return LangOpts; } + const IntrusiveRefCntPtr<llvm::vfs::FileSystem> &getFileSystem() const { + return FS; + } const HeaderSearchOptions &getHeaderSearchOpts() const { return HeaderSearchOpts; } const PreprocessorOptions &getPreprocessorOpts() |