clang  3.7.0
Classes | Public Member Functions | Friends | List of all members
clang::CodeGen::CGDebugInfo Class Reference

#include <CGDebugInfo.h>

Public Member Functions

 CGDebugInfo (CodeGenModule &CGM)
 
 ~CGDebugInfo ()
 
void finalize ()
 
void setLocation (SourceLocation Loc)
 
void EmitLocation (CGBuilderTy &Builder, SourceLocation Loc)
 
void EmitFunctionStart (GlobalDecl GD, SourceLocation Loc, SourceLocation ScopeLoc, QualType FnType, llvm::Function *Fn, CGBuilderTy &Builder)
 
void EmitFunctionEnd (CGBuilderTy &Builder)
 Constructs the debug code for exiting a function. More...
 
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, llvm::Instruction *InsertPoint=0)
 
void EmitDeclareOfArgVariable (const VarDecl *Decl, llvm::Value *AI, unsigned ArgNo, CGBuilderTy &Builder)
 
void EmitDeclareOfBlockLiteralArgVariable (const CGBlockInfo &block, llvm::Value *Arg, unsigned ArgNo, llvm::Value *LocalAddr, CGBuilderTy &Builder)
 
void EmitGlobalVariable (llvm::GlobalVariable *GV, const VarDecl *Decl)
 Emit information about a global variable. More...
 
void EmitGlobalVariable (const ValueDecl *VD, llvm::Constant *Init)
 Emit global variable's debug info. More...
 
void EmitUsingDirective (const UsingDirectiveDecl &UD)
 Emit C++ using directive. More...
 
void EmitExplicitCastType (QualType Ty)
 Emit the type explicitly casted to. More...
 
void EmitUsingDecl (const UsingDecl &UD)
 Emit C++ using declaration. More...
 
void EmitImportDecl (const ImportDecl &ID)
 Emit an declaration. More...
 
llvm::DIImportedEntity * EmitNamespaceAlias (const NamespaceAliasDecl &NA)
 Emit C++ namespace alias. More...
 
llvm::DIType * getOrCreateRecordType (QualType Ty, SourceLocation L)
 Emit record type's standalone debug info. More...
 
llvm::DIType * getOrCreateInterfaceType (QualType Ty, SourceLocation Loc)
 Emit an Objective-C interface type standalone debug info. More...
 
void completeType (const EnumDecl *ED)
 
void completeType (const RecordDecl *RD)
 
void completeRequiredType (const RecordDecl *RD)
 
void completeClassData (const RecordDecl *RD)
 
void completeTemplateDefinition (const ClassTemplateSpecializationDecl &SD)
 

Friends

class ApplyDebugLocation
 
class SaveAndRestoreLocation
 

Detailed Description

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 49 of file CGDebugInfo.h.

Constructor & Destructor Documentation

CGDebugInfo::CGDebugInfo ( CodeGenModule CGM)

Definition at line 46 of file CGDebugInfo.cpp.

CGDebugInfo::~CGDebugInfo ( )

Definition at line 52 of file CGDebugInfo.cpp.

Member Function Documentation

void CGDebugInfo::completeClassData ( const RecordDecl RD)
void CGDebugInfo::completeRequiredType ( const RecordDecl RD)
void CGDebugInfo::completeTemplateDefinition ( const ClassTemplateSpecializationDecl SD)
void CGDebugInfo::completeType ( const EnumDecl ED)
void CGDebugInfo::completeType ( const RecordDecl RD)
void CGDebugInfo::EmitDeclareOfArgVariable ( const VarDecl Decl,
llvm::Value AI,
unsigned  ArgNo,
CGBuilderTy Builder 
)

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

Definition at line 2947 of file CGDebugInfo.cpp.

References clang::CodeGenOptions::LimitedDebugInfo.

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

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

Definition at line 2863 of file CGDebugInfo.cpp.

References clang::CodeGenOptions::LimitedDebugInfo.

void CGDebugInfo::EmitDeclareOfBlockDeclRefVariable ( const VarDecl variable,
llvm::Value storage,
CGBuilderTy Builder,
const CGBlockInfo blockInfo,
llvm::Instruction *  InsertPoint = 0 
)
void CGDebugInfo::EmitDeclareOfBlockLiteralArgVariable ( const CGBlockInfo block,
llvm::Value Arg,
unsigned  ArgNo,
llvm::Value LocalAddr,
CGBuilderTy Builder 
)
void CGDebugInfo::EmitExplicitCastType ( QualType  Ty)

Emit the type explicitly casted to.

Definition at line 3358 of file CGDebugInfo.cpp.

References clang::CodeGenOptions::LimitedDebugInfo.

void CGDebugInfo::EmitFunctionEnd ( CGBuilderTy Builder)

Constructs the debug code for exiting a function.

Definition at line 2656 of file CGDebugInfo.cpp.

References clang::markup::EmitLocation().

void CGDebugInfo::EmitFunctionStart ( GlobalDecl  GD,
SourceLocation  Loc,
SourceLocation  ScopeLoc,
QualType  FnType,
llvm::Function *  Fn,
CGBuilderTy Builder 
)

Emit a call to llvm.dbg.function.start to indicate start of a new function.

Parameters
LocThe location of the function header.
ScopeLocThe location of the function body.

Definition at line 2531 of file CGDebugInfo.cpp.

References clang::Decl::getCanonicalDecl(), clang::FunctionDecl::getCanonicalDecl(), clang::GlobalDecl::getDecl(), clang::Decl::isImplicit(), and clang::SourceLocation::isInvalid().

void CGDebugInfo::EmitGlobalVariable ( llvm::GlobalVariable *  GV,
const VarDecl Decl 
)
void CGDebugInfo::EmitGlobalVariable ( const ValueDecl VD,
llvm::Constant *  Init 
)
void CGDebugInfo::EmitImportDecl ( const ImportDecl ID)
void CGDebugInfo::EmitLexicalBlockEnd ( CGBuilderTy Builder,
SourceLocation  Loc 
)

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

Definition at line 2643 of file CGDebugInfo.cpp.

References clang::CodeGenOptions::DebugLineTablesOnly, and clang::markup::EmitLocation().

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

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

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

Definition at line 2627 of file CGDebugInfo.cpp.

References clang::CodeGenOptions::DebugLineTablesOnly.

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

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

Emit metadata to indicate a change in line/column information in the source file. If the location is invalid, the previous location will be reused.

Definition at line 2606 of file CGDebugInfo.cpp.

llvm::DIImportedEntity * CGDebugInfo::EmitNamespaceAlias ( const NamespaceAliasDecl NA)
void CGDebugInfo::EmitUsingDecl ( const UsingDecl UD)
void CGDebugInfo::EmitUsingDirective ( const UsingDirectiveDecl UD)
void CGDebugInfo::finalize ( )

Definition at line 3308 of file CGDebugInfo.cpp.

References p.

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

llvm::DIType * CGDebugInfo::getOrCreateInterfaceType ( QualType  Ty,
SourceLocation  Loc 
)

Emit an Objective-C interface type standalone debug info.

Definition at line 1390 of file CGDebugInfo.cpp.

References clang::QualType::getAsOpaquePtr(), and clang::CodeGenOptions::LimitedDebugInfo.

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

Emit record type's standalone debug info.

Definition at line 1383 of file CGDebugInfo.cpp.

References clang::CodeGenOptions::LimitedDebugInfo.

void CGDebugInfo::setLocation ( SourceLocation  Loc)

Friends And Related Function Documentation

friend class ApplyDebugLocation
friend

Definition at line 50 of file CGDebugInfo.h.

friend class SaveAndRestoreLocation
friend

Definition at line 51 of file CGDebugInfo.h.


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