diff options
author | NAKAMURA Takumi <geek4civic@gmail.com> | 2025-01-10 19:27:02 +0900 |
---|---|---|
committer | NAKAMURA Takumi <geek4civic@gmail.com> | 2025-01-10 19:27:02 +0900 |
commit | c4a2ca9b936391fb930ecbb3d5c5d34e371e45fb (patch) | |
tree | f7bbf2b44d3dc178bcbaefdc56254e2220237737 /clang/lib/CodeGen/BackendConsumer.h | |
parent | 5633a2072696b20c554ff5568c5a1d25aa7e8db3 (diff) | |
parent | 0350c1eba1c1a6b73a8d9c271a7f3c8b33202579 (diff) | |
download | llvm-users/chapuni/cov/merge/forfile-base.zip llvm-users/chapuni/cov/merge/forfile-base.tar.gz llvm-users/chapuni/cov/merge/forfile-base.tar.bz2 |
Merge branch 'users/chapuni/cov/merge/region_segment' into users/chapuni/cov/merge/forfile-baseusers/chapuni/cov/merge/forfile-base
Diffstat (limited to 'clang/lib/CodeGen/BackendConsumer.h')
-rw-r--r-- | clang/lib/CodeGen/BackendConsumer.h | 34 |
1 files changed, 9 insertions, 25 deletions
diff --git a/clang/lib/CodeGen/BackendConsumer.h b/clang/lib/CodeGen/BackendConsumer.h index a023d29..d932a78 100644 --- a/clang/lib/CodeGen/BackendConsumer.h +++ b/clang/lib/CodeGen/BackendConsumer.h @@ -29,17 +29,16 @@ class BackendConsumer : public ASTConsumer { virtual void anchor(); DiagnosticsEngine &Diags; - BackendAction Action; const HeaderSearchOptions &HeaderSearchOpts; const CodeGenOptions &CodeGenOpts; const TargetOptions &TargetOpts; const LangOptions &LangOpts; std::unique_ptr<raw_pwrite_stream> AsmOutStream; - ASTContext *Context; + ASTContext *Context = nullptr; IntrusiveRefCntPtr<llvm::vfs::FileSystem> FS; llvm::Timer LLVMIRGeneration; - unsigned LLVMIRGenerationRefCount; + unsigned LLVMIRGenerationRefCount = 0; /// True if we've finished generating IR. This prevents us from generating /// additional LLVM IR after emitting output in HandleTranslationUnit. This @@ -48,6 +47,8 @@ class BackendConsumer : public ASTConsumer { bool TimerIsEnabled = false; + BackendAction Action; + std::unique_ptr<CodeGenerator> Gen; SmallVector<LinkModule, 4> LinkModules; @@ -69,29 +70,12 @@ class BackendConsumer : public ASTConsumer { llvm::Module *CurLinkModule = nullptr; public: - BackendConsumer(BackendAction Action, DiagnosticsEngine &Diags, - IntrusiveRefCntPtr<llvm::vfs::FileSystem> VFS, - const HeaderSearchOptions &HeaderSearchOpts, - const PreprocessorOptions &PPOpts, - const CodeGenOptions &CodeGenOpts, - const TargetOptions &TargetOpts, const LangOptions &LangOpts, - const std::string &InFile, - SmallVector<LinkModule, 4> LinkModules, - std::unique_ptr<raw_pwrite_stream> OS, llvm::LLVMContext &C, - CoverageSourceInfo *CoverageInfo = nullptr); - - // This constructor is used in installing an empty BackendConsumer - // to use the clang diagnostic handler for IR input files. It avoids - // initializing the OS field. - BackendConsumer(BackendAction Action, DiagnosticsEngine &Diags, + BackendConsumer(const CompilerInstance &CI, BackendAction Action, IntrusiveRefCntPtr<llvm::vfs::FileSystem> VFS, - const HeaderSearchOptions &HeaderSearchOpts, - const PreprocessorOptions &PPOpts, - const CodeGenOptions &CodeGenOpts, - const TargetOptions &TargetOpts, const LangOptions &LangOpts, - llvm::Module *Module, SmallVector<LinkModule, 4> LinkModules, - llvm::LLVMContext &C, - CoverageSourceInfo *CoverageInfo = nullptr); + llvm::LLVMContext &C, SmallVector<LinkModule, 4> LinkModules, + StringRef InFile, std::unique_ptr<raw_pwrite_stream> OS, + CoverageSourceInfo *CoverageInfo, + llvm::Module *CurLinkModule = nullptr); llvm::Module *getModule() const; std::unique_ptr<llvm::Module> takeModule(); |