aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/BackendConsumer.h
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2025-01-10 19:27:02 +0900
committerNAKAMURA Takumi <geek4civic@gmail.com>2025-01-10 19:27:02 +0900
commitc4a2ca9b936391fb930ecbb3d5c5d34e371e45fb (patch)
treef7bbf2b44d3dc178bcbaefdc56254e2220237737 /clang/lib/CodeGen/BackendConsumer.h
parent5633a2072696b20c554ff5568c5a1d25aa7e8db3 (diff)
parent0350c1eba1c1a6b73a8d9c271a7f3c8b33202579 (diff)
downloadllvm-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.h34
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();