clang
7.0.0
|
Public Member Functions | |
BackendConsumer (BackendAction Action, DiagnosticsEngine &Diags, const HeaderSearchOptions &HeaderSearchOpts, const PreprocessorOptions &PPOpts, const CodeGenOptions &CodeGenOpts, const TargetOptions &TargetOpts, const LangOptions &LangOpts, bool TimePasses, const std::string &InFile, SmallVector< LinkModule, 4 > LinkModules, std::unique_ptr< raw_pwrite_stream > OS, LLVMContext &C, CoverageSourceInfo *CoverageInfo=nullptr) | |
llvm::Module * | getModule () const |
std::unique_ptr< llvm::Module > | takeModule () |
CodeGenerator * | getCodeGenerator () |
void | HandleCXXStaticMemberVarInstantiation (VarDecl *VD) override |
HandleCXXStaticMemberVarInstantiation - Tell the consumer that this. More... | |
void | Initialize (ASTContext &Ctx) override |
Initialize - This is called to initialize the consumer, providing the ASTContext. More... | |
bool | HandleTopLevelDecl (DeclGroupRef D) override |
HandleTopLevelDecl - Handle the specified top-level declaration. More... | |
void | HandleInlineFunctionDefinition (FunctionDecl *D) override |
This callback is invoked each time an inline (method or friend) function definition in a class is completed. More... | |
void | HandleInterestingDecl (DeclGroupRef D) override |
HandleInterestingDecl - Handle the specified interesting declaration. More... | |
bool | LinkInModules () |
void | HandleTranslationUnit (ASTContext &C) override |
HandleTranslationUnit - This method is called when the ASTs for entire translation unit have been parsed. More... | |
void | HandleTagDeclDefinition (TagDecl *D) override |
HandleTagDeclDefinition - This callback is invoked each time a TagDecl (e.g. More... | |
void | HandleTagDeclRequiredDefinition (const TagDecl *D) override |
This callback is invoked the first time each TagDecl is required to be complete. More... | |
void | CompleteTentativeDefinition (VarDecl *D) override |
CompleteTentativeDefinition - Callback invoked at the end of a translation unit to notify the consumer that the given tentative definition should be completed. More... | |
void | AssignInheritanceModel (CXXRecordDecl *RD) override |
Callback invoked when an MSInheritanceAttr has been attached to a CXXRecordDecl. More... | |
void | HandleVTable (CXXRecordDecl *RD) override |
Callback involved at the end of a translation unit to notify the consumer that a vtable for the given C++ class is required. More... | |
const FullSourceLoc | getBestLocationFromDebugLoc (const llvm::DiagnosticInfoWithLocationBase &D, bool &BadDebugInfo, StringRef &Filename, unsigned &Line, unsigned &Column) const |
Get the best possible source location to represent a diagnostic that may have associated debug info. More... | |
void | InlineAsmDiagHandler2 (const llvm::SMDiagnostic &, SourceLocation LocCookie) |
InlineAsmDiagHandler2 - This function is invoked when the backend hits an error parsing inline asm. More... | |
void | DiagnosticHandlerImpl (const llvm::DiagnosticInfo &DI) |
This function is invoked when the backend needs to report something to the user. More... | |
bool | InlineAsmDiagHandler (const llvm::DiagnosticInfoInlineAsm &D) |
Specialized handler for InlineAsm diagnostic. More... | |
bool | StackSizeDiagHandler (const llvm::DiagnosticInfoStackSize &D) |
Specialized handler for StackSize diagnostic. More... | |
void | UnsupportedDiagHandler (const llvm::DiagnosticInfoUnsupported &D) |
Specialized handler for unsupported backend feature diagnostic. More... | |
void | EmitOptimizationMessage (const llvm::DiagnosticInfoOptimizationBase &D, unsigned DiagID) |
Specialized handlers for optimization remarks. More... | |
void | OptimizationRemarkHandler (const llvm::DiagnosticInfoOptimizationBase &D) |
void | OptimizationRemarkHandler (const llvm::OptimizationRemarkAnalysisFPCommute &D) |
void | OptimizationRemarkHandler (const llvm::OptimizationRemarkAnalysisAliasing &D) |
void | OptimizationFailureHandler (const llvm::DiagnosticInfoOptimizationFailure &D) |
![]() | |
ASTConsumer () | |
virtual | ~ASTConsumer () |
virtual void | HandleCXXImplicitFunctionInstantiation (FunctionDecl *D) |
Invoked when a function is implicitly instantiated. More... | |
virtual void | HandleTopLevelDeclInObjCContainer (DeclGroupRef D) |
Handle the specified top-level declaration that occurred inside and ObjC container. More... | |
virtual void | HandleImplicitImportDecl (ImportDecl *D) |
Handle an ImportDecl that was implicitly created due to an inclusion directive. More... | |
virtual ASTMutationListener * | GetASTMutationListener () |
If the consumer is interested in entities getting modified after their initial creation, it should return a pointer to an ASTMutationListener here. More... | |
virtual ASTDeserializationListener * | GetASTDeserializationListener () |
If the consumer is interested in entities being deserialized from AST files, it should return a pointer to a ASTDeserializationListener here. More... | |
virtual void | PrintStats () |
PrintStats - If desired, print any statistics. More... | |
virtual bool | shouldSkipFunctionBody (Decl *D) |
This callback is called for each function if the Parser was initialized with SkipFunctionBodies set to true . More... | |
Static Public Member Functions | |
static void | InlineAsmDiagHandler (const llvm::SMDiagnostic &SM, void *Context, unsigned LocCookie) |
Definition at line 81 of file CodeGenAction.cpp.
|
inline |
Definition at line 111 of file CodeGenAction.cpp.
References clang::FrontendTimesIsEnabled.
|
inlineoverridevirtual |
Callback invoked when an MSInheritanceAttr has been attached to a CXXRecordDecl.
Reimplemented from clang::ASTConsumer.
Definition at line 320 of file CodeGenAction.cpp.
|
inlineoverridevirtual |
CompleteTentativeDefinition - Callback invoked at the end of a translation unit to notify the consumer that the given tentative definition should be completed.
The variable declaration itself will be a tentative definition. If it had an incomplete array type, its type will have already been changed to an array of size 1. However, the declaration remains a tentative definition and has not been modified by the introduction of an implicit zero initializer.
Reimplemented from clang::ASTConsumer.
Definition at line 316 of file CodeGenAction.cpp.
void BackendConsumer::DiagnosticHandlerImpl | ( | const llvm::DiagnosticInfo & | DI | ) |
This function is invoked when the backend needs to report something to the user.
Definition at line 703 of file CodeGenAction.cpp.
References ComputeDiagID, and ComputeDiagRemarkID.
void BackendConsumer::EmitOptimizationMessage | ( | const llvm::DiagnosticInfoOptimizationBase & | D, |
unsigned | DiagID | ||
) |
Specialized handlers for optimization remarks.
Note that these handlers only accept remarks and they always handle them.
Definition at line 603 of file CodeGenAction.cpp.
const FullSourceLoc BackendConsumer::getBestLocationFromDebugLoc | ( | const llvm::DiagnosticInfoWithLocationBase & | D, |
bool & | BadDebugInfo, | ||
StringRef & | Filename, | ||
unsigned & | Line, | ||
unsigned & | Column | ||
) | const |
Get the best possible source location to represent a diagnostic that may have associated debug info.
Definition at line 544 of file CodeGenAction.cpp.
|
inline |
Definition at line 137 of file CodeGenAction.cpp.
Referenced by clang::CodeGenAction::CreateASTConsumer().
|
inline |
Definition at line 132 of file CodeGenAction.cpp.
|
inlineoverridevirtual |
HandleCXXStaticMemberVarInstantiation - Tell the consumer that this.
Reimplemented from clang::ASTConsumer.
Definition at line 139 of file CodeGenAction.cpp.
|
inlineoverridevirtual |
This callback is invoked each time an inline (method or friend) function definition in a class is completed.
Reimplemented from clang::ASTConsumer.
Definition at line 180 of file CodeGenAction.cpp.
References clang::FrontendTimesIsEnabled, and clang::ASTContext::getSourceManager().
|
inlineoverridevirtual |
HandleInterestingDecl - Handle the specified interesting declaration.
This is called by the AST reader when deserializing things that might interest the consumer. The default implementation forwards to HandleTopLevelDecl.
Reimplemented from clang::ASTConsumer.
Definition at line 193 of file CodeGenAction.cpp.
|
inlineoverridevirtual |
HandleTagDeclDefinition - This callback is invoked each time a TagDecl (e.g.
struct, union, enum, class) is completed. This allows the client to hack on the type, which can occur at any point in the file (because these can be defined in declspecs).
Reimplemented from clang::ASTConsumer.
Definition at line 305 of file CodeGenAction.cpp.
|
inlineoverridevirtual |
This callback is invoked the first time each TagDecl is required to be complete.
Reimplemented from clang::ASTConsumer.
Definition at line 312 of file CodeGenAction.cpp.
|
inlineoverridevirtual |
HandleTopLevelDecl - Handle the specified top-level declaration.
This is called by the parser to process every top-level Decl*.
Reimplemented from clang::ASTConsumer.
Definition at line 157 of file CodeGenAction.cpp.
References clang::DeclGroupRef::begin(), clang::FrontendTimesIsEnabled, and clang::ASTContext::getSourceManager().
|
inlineoverridevirtual |
HandleTranslationUnit - This method is called when the ASTs for entire translation unit have been parsed.
Reimplemented from clang::ASTConsumer.
Definition at line 228 of file CodeGenAction.cpp.
References clang::EmbedBitcode(), clang::EmitBackendOutput(), clang::FrontendTimesIsEnabled, clang::TargetInfo::getDataLayout(), clang::ASTContext::getTargetInfo(), and clang::CodeGenOptions::ProfileNone.
|
inlineoverridevirtual |
Callback involved at the end of a translation unit to notify the consumer that a vtable for the given C++ class is required.
RD | The class whose vtable was used. |
Reimplemented from clang::ASTConsumer.
Definition at line 324 of file CodeGenAction.cpp.
|
inlineoverridevirtual |
Initialize - This is called to initialize the consumer, providing the ASTContext.
Reimplemented from clang::ASTConsumer.
Definition at line 143 of file CodeGenAction.cpp.
References clang::FrontendTimesIsEnabled.
|
inlinestatic |
Definition at line 328 of file CodeGenAction.cpp.
bool BackendConsumer::InlineAsmDiagHandler | ( | const llvm::DiagnosticInfoInlineAsm & | D | ) |
Specialized handler for InlineAsm diagnostic.
Definition at line 502 of file CodeGenAction.cpp.
References ComputeDiagID, clang::SourceLocation::getFromRawEncoding(), and clang::SourceLocation::isValid().
void BackendConsumer::InlineAsmDiagHandler2 | ( | const llvm::SMDiagnostic & | D, |
SourceLocation | LocCookie | ||
) |
InlineAsmDiagHandler2 - This function is invoked when the backend hits an error parsing inline asm.
The SMDiagnostic indicates the error relative to the temporary memory buffer that the inline asm parser has set up.
Definition at line 411 of file CodeGenAction.cpp.
References ConvertBackendLocation().
|
inline |
Definition at line 200 of file CodeGenAction.cpp.
void BackendConsumer::OptimizationFailureHandler | ( | const llvm::DiagnosticInfoOptimizationFailure & | D | ) |
Definition at line 696 of file CodeGenAction.cpp.
void BackendConsumer::OptimizationRemarkHandler | ( | const llvm::DiagnosticInfoOptimizationBase & | D | ) |
Definition at line 635 of file CodeGenAction.cpp.
void BackendConsumer::OptimizationRemarkHandler | ( | const llvm::OptimizationRemarkAnalysisFPCommute & | D | ) |
Definition at line 670 of file CodeGenAction.cpp.
void BackendConsumer::OptimizationRemarkHandler | ( | const llvm::OptimizationRemarkAnalysisAliasing & | D | ) |
Definition at line 683 of file CodeGenAction.cpp.
bool BackendConsumer::StackSizeDiagHandler | ( | const llvm::DiagnosticInfoStackSize & | D | ) |
Specialized handler for StackSize diagnostic.
Definition at line 527 of file CodeGenAction.cpp.
References clang::Decl::castToDeclContext().
|
inline |
Definition at line 133 of file CodeGenAction.cpp.
Referenced by clang::CodeGenAction::EndSourceFileAction().
void BackendConsumer::UnsupportedDiagHandler | ( | const llvm::DiagnosticInfoUnsupported & | D | ) |
Specialized handler for unsupported backend feature diagnostic.
Definition at line 581 of file CodeGenAction.cpp.