diff options
author | NAKAMURA Takumi <geek4civic@gmail.com> | 2025-01-09 18:49:54 +0900 |
---|---|---|
committer | NAKAMURA Takumi <geek4civic@gmail.com> | 2025-01-09 18:49:54 +0900 |
commit | e2810c9a248f4c7fbfae84bb32b6f7e01027458b (patch) | |
tree | ae0b02a8491b969a1cee94ea16ffe42c559143c5 /clang/lib/CodeGen/BackendConsumer.h | |
parent | fa04eb4af95c1ca7377279728cb004bcd2324d01 (diff) | |
parent | bdcf47e4bcb92889665825654bb80a8bbe30379e (diff) | |
download | llvm-users/chapuni/cov/single/switch.zip llvm-users/chapuni/cov/single/switch.tar.gz llvm-users/chapuni/cov/single/switch.tar.bz2 |
Merge branch 'users/chapuni/cov/single/base' into users/chapuni/cov/single/switchusers/chapuni/cov/single/switch
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(); |