clang API Documentation

Public Member Functions
clang::CodeGen::CGDebugInfo Class Reference

#include <CGDebugInfo.h>

List of all members.

Public Member Functions

 CGDebugInfo (CodeGenModule &CGM)
 ~CGDebugInfo ()
void finalize (void)
void setLocation (SourceLocation Loc)
void EmitLocation (CGBuilderTy &Builder, SourceLocation Loc)
void EmitFunctionStart (GlobalDecl GD, QualType FnType, llvm::Function *Fn, CGBuilderTy &Builder)
 EmitFunctionStart - Constructs the debug code for entering a function.
void EmitFunctionEnd (CGBuilderTy &Builder)
 EmitFunctionEnd - Constructs the debug code for exiting a function.
void EmitLexicalBlockStart (CGBuilderTy &Builder, SourceLocation Loc)
void EmitLexicalBlockEnd (CGBuilderTy &Builder, SourceLocation Loc)
void EmitDeclareOfAutoVariable (const VarDecl *Decl, llvm::Value *AI, CGBuilderTy &Builder)
void EmitDeclareOfBlockDeclRefVariable (const VarDecl *variable, llvm::Value *storage, CGBuilderTy &Builder, const CGBlockInfo &blockInfo)
void EmitDeclareOfArgVariable (const VarDecl *Decl, llvm::Value *AI, unsigned ArgNo, CGBuilderTy &Builder)
void EmitDeclareOfBlockLiteralArgVariable (const CGBlockInfo &block, llvm::Value *addr, CGBuilderTy &Builder)
void EmitGlobalVariable (llvm::GlobalVariable *GV, const VarDecl *Decl)
 EmitGlobalVariable - Emit information about a global variable.
void EmitGlobalVariable (llvm::GlobalVariable *GV, ObjCInterfaceDecl *Decl)
 EmitGlobalVariable - Emit information about an objective-c interface.
void EmitGlobalVariable (const ValueDecl *VD, llvm::Constant *Init)
 EmitGlobalVariable - Emit global variable's debug info.
llvm::DIType getOrCreateRecordType (QualType Ty, SourceLocation L)
 getOrCreateRecordType - Emit record type's standalone debug info.
llvm::DIType getOrCreateInterfaceType (QualType Ty, SourceLocation Loc)

Detailed Description

CGDebugInfo - This class gathers all debug information during compilation and is responsible for emitting to llvm globals or pass directly to the backend.

Definition at line 46 of file CGDebugInfo.h.


Constructor & Destructor Documentation

CGDebugInfo::CGDebugInfo ( CodeGenModule CGM)

Definition at line 41 of file CGDebugInfo.cpp.

CGDebugInfo::~CGDebugInfo ( )

Definition at line 47 of file CGDebugInfo.cpp.


Member Function Documentation

void CGDebugInfo::EmitDeclareOfArgVariable ( const VarDecl VD,
llvm::Value AI,
unsigned  ArgNo,
CGBuilderTy Builder 
)

EmitDeclareOfArgVariable - Emit call to llvm.dbg.declare for an argument variable declaration.

Definition at line 2422 of file CGDebugInfo.cpp.

References clang::CodeGenOptions::DebugInfo, clang::CodeGen::CodeGenModule::getCodeGenOpts(), and clang::CodeGenOptions::LimitedDebugInfo.

void CGDebugInfo::EmitDeclareOfAutoVariable ( const VarDecl Decl,
llvm::Value AI,
CGBuilderTy Builder 
)

EmitDeclareOfAutoVariable - Emit call to llvm.dbg.declare for an automatic variable declaration.

Definition at line 2354 of file CGDebugInfo.cpp.

References clang::CodeGenOptions::DebugInfo, clang::CodeGen::CodeGenModule::getCodeGenOpts(), and clang::CodeGenOptions::LimitedDebugInfo.

void CGDebugInfo::EmitDeclareOfBlockDeclRefVariable ( const VarDecl variable,
llvm::Value storage,
CGBuilderTy Builder,
const CGBlockInfo blockInfo 
)
void CGDebugInfo::EmitDeclareOfBlockLiteralArgVariable ( const CGBlockInfo block,
llvm::Value addr,
CGBuilderTy Builder 
)
void CGDebugInfo::EmitFunctionEnd ( CGBuilderTy Builder)

EmitFunctionEnd - Constructs the debug code for exiting a function.

Definition at line 2140 of file CGDebugInfo.cpp.

References EmitLexicalBlockEnd().

void CGDebugInfo::EmitFunctionStart ( GlobalDecl  GD,
QualType  FnType,
llvm::Function *  Fn,
CGBuilderTy Builder 
)
void CGDebugInfo::EmitGlobalVariable ( llvm::GlobalVariable *  GV,
const VarDecl Decl 
)
void CGDebugInfo::EmitGlobalVariable ( llvm::GlobalVariable *  GV,
ObjCInterfaceDecl Decl 
)
void CGDebugInfo::EmitGlobalVariable ( const ValueDecl VD,
llvm::Constant *  Init 
)
void CGDebugInfo::EmitLexicalBlockEnd ( CGBuilderTy Builder,
SourceLocation  Loc 
)

EmitLexicalBlockEnd - Emit metadata to indicate the end of a new lexical block and pop the current block.

EmitLexicalBlockEnd - Constructs the debug code for exiting a declarative region - end of a DW_TAG_lexical_block.

Definition at line 2130 of file CGDebugInfo.cpp.

References EmitLocation().

Referenced by clang::CodeGen::CodeGenFunction::EmitCXXForRangeStmt(), clang::CodeGen::CodeGenFunction::EmitForStmt(), EmitFunctionEnd(), clang::CodeGen::CodeGenFunction::EmitObjCAutoreleasePoolStmt(), clang::CodeGen::CodeGenFunction::EmitObjCForCollectionStmt(), and clang::CodeGen::CodeGenFunction::LexicalScope::~LexicalScope().

void CGDebugInfo::EmitLexicalBlockStart ( CGBuilderTy Builder,
SourceLocation  Loc 
)

EmitLexicalBlockStart - Emit metadata to indicate the beginning of a new lexical block and push the block onto the stack.

EmitLexicalBlockStart - Constructs the debug code for entering a declarative region - beginning of a DW_TAG_lexical_block.

Definition at line 2115 of file CGDebugInfo.cpp.

References setLocation().

Referenced by clang::CodeGen::CodeGenFunction::EmitCXXForRangeStmt(), clang::CodeGen::CodeGenFunction::EmitForStmt(), clang::CodeGen::CodeGenFunction::EmitObjCAutoreleasePoolStmt(), and clang::CodeGen::CodeGenFunction::EmitObjCForCollectionStmt().

void CGDebugInfo::EmitLocation ( CGBuilderTy Builder,
SourceLocation  Loc 
)

EmitLocation - Emit metadata to indicate a change in line/column information in the source file.

Definition at line 2075 of file CGDebugInfo.cpp.

References clang::CodeGen::CodeGenModule::getContext(), clang::SourceManager::getExpansionLoc(), clang::ASTContext::getSourceManager(), clang::SourceLocation::isInvalid(), clang::SourceLocation::isMacroID(), and setLocation().

Referenced by EmitLexicalBlockEnd().

void CGDebugInfo::finalize ( void  )

Definition at line 2687 of file CGDebugInfo.cpp.

Referenced by clang::CodeGen::CodeGenModule::Release().

llvm::DIType CGDebugInfo::getOrCreateInterfaceType ( QualType  D,
SourceLocation  Loc 
)

getOrCreateInterfaceType - Emit an objective c interface type standalone debug info.

Definition at line 1186 of file CGDebugInfo.cpp.

References clang::CodeGenOptions::DebugInfo, clang::CodeGen::CodeGenModule::getCodeGenOpts(), and clang::CodeGenOptions::LimitedDebugInfo.

llvm::DIType CGDebugInfo::getOrCreateRecordType ( QualType  Ty,
SourceLocation  L 
)

getOrCreateRecordType - Emit record type's standalone debug info.

Definition at line 1177 of file CGDebugInfo.cpp.

References clang::CodeGenOptions::DebugInfo, clang::CodeGen::CodeGenModule::getCodeGenOpts(), and clang::CodeGenOptions::LimitedDebugInfo.

Referenced by clang::CodeGen::CodeGenFunction::EmitCXXConstructorCall().

void CGDebugInfo::setLocation ( SourceLocation  Loc)

The documentation for this class was generated from the following files: