9#ifndef LLVM_CLANG_LIB_CODEGEN_BACKENDCONSUMER_H
10#define LLVM_CLANG_LIB_CODEGEN_BACKENDCONSUMER_H
17#include "llvm/Support/Timer.h"
25 virtual void anchor();
31 std::unique_ptr<raw_pwrite_stream> AsmOutStream;
35 llvm::Timer LLVMIRGeneration;
36 unsigned LLVMIRGenerationRefCount = 0;
38 bool TimerIsEnabled =
false;
42 std::unique_ptr<CodeGenerator> Gen;
55 StringRef InFile, std::unique_ptr<raw_pwrite_stream> OS,
57 llvm::Module *CurLinkModule =
nullptr);
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
llvm::Module * getModule() const
void CompleteExternalDeclaration(DeclaratorDecl *D) override
CompleteExternalDeclaration - Callback invoked at the end of a translation unit to notify the consume...
void HandleVTable(CXXRecordDecl *RD) override
Callback involved at the end of a translation unit to notify the consumer that a vtable for the given...
void HandleTagDeclDefinition(TagDecl *D) override
HandleTagDeclDefinition - This callback is invoked each time a TagDecl (e.g.
bool HandleTopLevelDecl(DeclGroupRef D) override
HandleTopLevelDecl - Handle the specified top-level declaration.
void Initialize(ASTContext &Ctx) override
Initialize - This is called to initialize the consumer, providing the ASTContext.
void HandleInlineFunctionDefinition(FunctionDecl *D) override
This callback is invoked each time an inline (method or friend) function definition in a class is com...
void HandleTagDeclRequiredDefinition(const TagDecl *D) override
This callback is invoked the first time each TagDecl is required to be complete.
void HandleInterestingDecl(DeclGroupRef D) override
HandleInterestingDecl - Handle the specified interesting declaration.
void HandleCXXStaticMemberVarInstantiation(VarDecl *VD) override
HandleCXXStaticMemberVarInstantiation - Tell the consumer that this.
std::unique_ptr< llvm::DiagnosticHandler > createDiagnosticHandler()
Create an llvm::DiagnosticHandler that routes LLVM backend diagnostics through this consumer's clang ...
std::unique_ptr< llvm::Module > takeModule()
void AssignInheritanceModel(CXXRecordDecl *RD) override
Callback invoked when an MSInheritanceAttr has been attached to a CXXRecordDecl.
void HandleTranslationUnit(ASTContext &C) override
HandleTranslationUnit - This method is called when the ASTs for entire translation unit have been par...
void CompleteTentativeDefinition(VarDecl *D) override
CompleteTentativeDefinition - Callback invoked at the end of a translation unit to notify the consume...
bool LinkInModules(llvm::Module *M)
CodeGenerator * getCodeGenerator()
BackendConsumer(CompilerInstance &CI, BackendAction Action, IntrusiveRefCntPtr< llvm::vfs::FileSystem > VFS, llvm::LLVMContext &C, SmallVector< LinkModule, 4 > LinkModules, StringRef InFile, std::unique_ptr< raw_pwrite_stream > OS, CoverageSourceInfo *CoverageInfo, llvm::Module *CurLinkModule=nullptr)
Owns the state needed to translate LLVM backend diagnostics into clang diagnostics,...
Represents a C++ struct/union/class.
CodeGenOptions - Track various options which control how the code is optimized and passed to the back...
The primary public interface to the Clang code generator.
CompilerInstance - Helper class for managing a single instance of the Clang compiler.
Stores additional source code information like skipped ranges which is required by the coverage mappi...
Represents a ValueDecl that came out of a declarator.
Concrete class used by the front-end to report problems and issues.
Represents a function declaration or definition.
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
Represents the declaration of a struct/union/class/enum.
Options for controlling the target.
Represents a variable declaration or definition.
Top level wrappers for InstallAPI frontend operations.