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

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

#include "/home/buildbot/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/CodeGen/CGDebugInfo.h"

Public Member Functions

 CGDebugInfo (CodeGenModule &CGM)
 
 ~CGDebugInfo ()
 
void finalize ()
 
std::string remapDIPath (StringRef) const
 Remap a given path with the current debug prefix map.
 
void registerVLASizeExpression (QualType Ty, llvm::Metadata *SizeExpr)
 Register VLA size expression debug node with the qualified type.
 
void setLocation (SourceLocation Loc)
 Update the current source location.
 
SourceLocation getLocation () const
 Return the current source location.
 
void setInlinedAt (llvm::MDNode *InlinedAt)
 Update the current inline scope.
 
llvm::MDNode * getInlinedAt () const
 
llvm::DebugLoc SourceLocToDebugLoc (SourceLocation Loc)
 
void EmitLocation (CGBuilderTy &Builder, SourceLocation Loc)
 Emit metadata to indicate a change in line/column information in the source file.
 
QualType getFunctionType (const FunctionDecl *FD, QualType RetTy, const SmallVectorImpl< const VarDecl * > &Args)
 
void emitFunctionStart (GlobalDecl GD, SourceLocation Loc, SourceLocation ScopeLoc, QualType FnType, llvm::Function *Fn, bool CurFnIsThunk)
 Emit a call to llvm.dbg.function.start to indicate start of a new function.
 
void EmitInlineFunctionStart (CGBuilderTy &Builder, GlobalDecl GD)
 Start a new scope for an inlined function.
 
void EmitInlineFunctionEnd (CGBuilderTy &Builder)
 End an inlined function scope.
 
void EmitFunctionDecl (GlobalDecl GD, SourceLocation Loc, QualType FnType, llvm::Function *Fn=nullptr)
 Emit debug info for a function declaration.
 
void EmitFuncDeclForCallSite (llvm::CallBase *CallOrInvoke, QualType CalleeType, const FunctionDecl *CalleeDecl)
 Emit debug info for an extern function being called.
 
void EmitFunctionEnd (CGBuilderTy &Builder, llvm::Function *Fn)
 Constructs the debug code for exiting a function.
 
void EmitLexicalBlockStart (CGBuilderTy &Builder, SourceLocation Loc)
 Emit metadata to indicate the beginning of a new lexical block and push the block onto the stack.
 
void EmitLexicalBlockEnd (CGBuilderTy &Builder, SourceLocation Loc)
 Emit metadata to indicate the end of a new lexical block and pop the current block.
 
llvm::DILocalVariable * EmitDeclareOfAutoVariable (const VarDecl *Decl, llvm::Value *AI, CGBuilderTy &Builder, const bool UsePointerValue=false)
 Emit call to llvm.dbg.declare for an automatic variable declaration.
 
void EmitLabel (const LabelDecl *D, CGBuilderTy &Builder)
 Emit call to llvm.dbg.label for an label.
 
void EmitDeclareOfBlockDeclRefVariable (const VarDecl *variable, llvm::Value *storage, CGBuilderTy &Builder, const CGBlockInfo &blockInfo, llvm::Instruction *InsertPoint=nullptr)
 Emit call to llvm.dbg.declare for an imported variable declaration in a block.
 
llvm::DILocalVariable * EmitDeclareOfArgVariable (const VarDecl *Decl, llvm::Value *AI, unsigned ArgNo, CGBuilderTy &Builder, bool UsePointerValue=false)
 Emit call to llvm.dbg.declare for an argument variable declaration.
 
void EmitDeclareOfBlockLiteralArgVariable (const CGBlockInfo &block, StringRef Name, unsigned ArgNo, llvm::AllocaInst *LocalAddr, CGBuilderTy &Builder)
 Emit call to llvm.dbg.declare for the block-literal argument to a block invocation function.
 
void EmitGlobalVariable (llvm::GlobalVariable *GV, const VarDecl *Decl)
 Emit information about a global variable.
 
void EmitGlobalVariable (const ValueDecl *VD, const APValue &Init)
 Emit a constant global variable's debug info.
 
void EmitExternalVariable (llvm::GlobalVariable *GV, const VarDecl *Decl)
 Emit information about an external variable.
 
void EmitPseudoVariable (CGBuilderTy &Builder, llvm::Instruction *Value, QualType Ty)
 Emit a pseudo variable and debug info for an intermediate value if it does not correspond to a variable in the source code, so that a profiler can track more accurate usage of certain instructions of interest.
 
void EmitGlobalAlias (const llvm::GlobalValue *GV, const GlobalDecl Decl)
 Emit information about global variable alias.
 
void EmitUsingDirective (const UsingDirectiveDecl &UD)
 Emit C++ using directive.
 
void EmitExplicitCastType (QualType Ty)
 Emit the type explicitly casted to.
 
void EmitAndRetainType (QualType Ty)
 Emit the type even if it might not be used.
 
void EmitUsingShadowDecl (const UsingShadowDecl &USD)
 Emit a shadow decl brought in by a using or using-enum.
 
void EmitUsingDecl (const UsingDecl &UD)
 Emit C++ using declaration.
 
void EmitUsingEnumDecl (const UsingEnumDecl &UD)
 Emit C++ using-enum declaration.
 
void EmitImportDecl (const ImportDecl &ID)
 Emit an @import declaration.
 
void AddStringLiteralDebugInfo (llvm::GlobalVariable *GV, const StringLiteral *S)
 DebugInfo isn't attached to string literals by default.
 
llvm::DIImportedEntity * EmitNamespaceAlias (const NamespaceAliasDecl &NA)
 Emit C++ namespace alias.
 
llvm::DIType * getOrCreateRecordType (QualType Ty, SourceLocation L)
 Emit record type's standalone debug info.
 
llvm::DIType * getOrCreateInterfaceType (QualType Ty, SourceLocation Loc)
 Emit an Objective-C interface type standalone debug info.
 
llvm::DIType * getOrCreateStandaloneType (QualType Ty, SourceLocation Loc)
 Emit standalone debug info for a type.
 
void addHeapAllocSiteMetadata (llvm::CallBase *CallSite, QualType AllocatedTy, SourceLocation Loc)
 Add heapallocsite metadata for MSAllocator calls.
 
void completeType (const EnumDecl *ED)
 
void completeType (const RecordDecl *RD)
 
void completeRequiredType (const RecordDecl *RD)
 
void completeClassData (const RecordDecl *RD)
 
void completeClass (const RecordDecl *RD)
 
void completeTemplateDefinition (const ClassTemplateSpecializationDecl &SD)
 
void completeUnusedClass (const CXXRecordDecl &D)
 
llvm::DIMacro * CreateMacro (llvm::DIMacroFile *Parent, unsigned MType, SourceLocation LineLoc, StringRef Name, StringRef Value)
 Create debug info for a macro defined by a #define directive or a macro undefined by a #undef directive.
 
llvm::DIMacroFile * CreateTempMacroFile (llvm::DIMacroFile *Parent, SourceLocation LineLoc, SourceLocation FileLoc)
 Create debug info for a file referenced by an #include directive.
 
Param2DILocTy & getParamDbgMappings ()
 
ParamDecl2StmtTy & getCoroutineParameterMappings ()
 
llvm::DILocation * CreateTrapFailureMessageFor (llvm::DebugLoc TrapLocation, StringRef Category, StringRef FailureMsg)
 Create a debug location from TrapLocation that adds an artificial inline frame where the frame name is.
 
void setDwoId (uint64_t Signature)
 Module debugging: Support for building PCMs.
 
void setModuleMap (ModuleMap &MMap)
 When generating debug information for a clang module or precompiled header, this module map will be used to determine the module of origin of each Decl.
 
void setPCHDescriptor (ASTSourceDescriptor PCH)
 When generating debug information for a clang module or precompiled header, this module map will be used to determine the module of origin of each Decl.
 

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

Constructor & Destructor Documentation

◆ CGDebugInfo()

CGDebugInfo::CGDebugInfo ( CodeGenModule CGM)

Definition at line 82 of file CGDebugInfo.cpp.

◆ ~CGDebugInfo()

CGDebugInfo::~CGDebugInfo ( )

Definition at line 89 of file CGDebugInfo.cpp.

Member Function Documentation

◆ addHeapAllocSiteMetadata()

void CGDebugInfo::addHeapAllocSiteMetadata ( llvm::CallBase *  CallSite,
QualType  AllocatedTy,
SourceLocation  Loc 
)

Add heapallocsite metadata for MSAllocator calls.

Definition at line 2599 of file CGDebugInfo.cpp.

References clang::CodeGen::CodeGenModule::getCodeGenOpts(), clang::CodeGen::CodeGenModule::getLLVMContext(), clang::Type::isVoidType(), and Loc.

◆ AddStringLiteralDebugInfo()

void CGDebugInfo::AddStringLiteralDebugInfo ( llvm::GlobalVariable *  GV,
const StringLiteral S 
)

DebugInfo isn't attached to string literals by default.

While certain aspects of debuginfo aren't useful for string literals (like a name), it's nice to be able to symbolize the line and column information. This is especially useful for sanitizers, as it allows symbolization of heap-buffer-overflows on constant strings.

Definition at line 5863 of file CGDebugInfo.cpp.

References clang::File, clang::CodeGen::CodeGenModule::getContext(), clang::SourceManager::getPresumedLoc(), clang::ASTContext::getSourceManager(), clang::PresumedLoc::isValid(), and Loc.

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

◆ completeClass()

void CGDebugInfo::completeClass ( const RecordDecl RD)

◆ completeClassData()

void CGDebugInfo::completeClassData ( const RecordDecl RD)

◆ completeRequiredType()

void CGDebugInfo::completeRequiredType ( const RecordDecl RD)

◆ completeTemplateDefinition()

void CGDebugInfo::completeTemplateDefinition ( const ClassTemplateSpecializationDecl SD)

Definition at line 3660 of file CGDebugInfo.cpp.

References completeUnusedClass().

◆ completeType() [1/2]

void CGDebugInfo::completeType ( const EnumDecl ED)

◆ completeType() [2/2]

void CGDebugInfo::completeType ( const RecordDecl RD)

◆ completeUnusedClass()

void CGDebugInfo::completeUnusedClass ( const CXXRecordDecl D)

◆ CreateMacro()

llvm::DIMacro * CGDebugInfo::CreateMacro ( llvm::DIMacroFile *  Parent,
unsigned  MType,
SourceLocation  LineLoc,
StringRef  Name,
StringRef  Value 
)

Create debug info for a macro defined by a #define directive or a macro undefined by a #undef directive.

Definition at line 3538 of file CGDebugInfo.cpp.

References clang::SourceLocation::isInvalid(), clang::Line, and Parent.

Referenced by clang::MacroPPCallbacks::MacroDefined(), and clang::MacroPPCallbacks::MacroUndefined().

◆ CreateTempMacroFile()

llvm::DIMacroFile * CGDebugInfo::CreateTempMacroFile ( llvm::DIMacroFile *  Parent,
SourceLocation  LineLoc,
SourceLocation  FileLoc 
)

Create debug info for a file referenced by an #include directive.

Definition at line 3545 of file CGDebugInfo.cpp.

References clang::SourceLocation::isInvalid(), clang::Line, and Parent.

◆ CreateTrapFailureMessageFor()

llvm::DILocation * CGDebugInfo::CreateTrapFailureMessageFor ( llvm::DebugLoc  TrapLocation,
StringRef  Category,
StringRef  FailureMsg 
)

Create a debug location from TrapLocation that adds an artificial inline frame where the frame name is.

  • <Prefix>:<Category>:<FailureMsg>

<Prefix> is "__clang_trap_msg".

This is used to store failure reasons for traps.

Definition at line 3553 of file CGDebugInfo.cpp.

References Category, ClangTrapPrefix, and clang::CodeGen::CodeGenModule::getLLVMContext().

◆ EmitAndRetainType()

void CGDebugInfo::EmitAndRetainType ( QualType  Ty)

Emit the type even if it might not be used.

Definition at line 6089 of file CGDebugInfo.cpp.

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

◆ EmitDeclareOfArgVariable()

llvm::DILocalVariable * CGDebugInfo::EmitDeclareOfArgVariable ( const VarDecl Decl,
llvm::Value *  AI,
unsigned  ArgNo,
CGBuilderTy Builder,
bool  UsePointerValue = false 
)

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

Definition at line 5159 of file CGDebugInfo.cpp.

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

◆ EmitDeclareOfAutoVariable()

llvm::DILocalVariable * CGDebugInfo::EmitDeclareOfAutoVariable ( const VarDecl Decl,
llvm::Value *  AI,
CGBuilderTy Builder,
const bool  UsePointerValue = false 
)

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

Returns a pointer to the DILocalVariable associated with the llvm.dbg.declare, or nullptr otherwise.

Definition at line 5033 of file CGDebugInfo.cpp.

References clang::CodeGen::CodeGenModule::getCodeGenOpts(), clang::ValueDecl::getType(), clang::CodeGenOptions::hasReducedDebugInfo(), and clang::Type::isReferenceType().

◆ EmitDeclareOfBlockDeclRefVariable()

void CGDebugInfo::EmitDeclareOfBlockDeclRefVariable ( const VarDecl variable,
llvm::Value *  storage,
CGBuilderTy Builder,
const CGBlockInfo blockInfo,
llvm::Instruction *  InsertPoint = nullptr 
)

◆ EmitDeclareOfBlockLiteralArgVariable()

void CGDebugInfo::EmitDeclareOfBlockLiteralArgVariable ( const CGBlockInfo block,
StringRef  Name,
unsigned  ArgNo,
llvm::AllocaInst *  LocalAddr,
CGBuilderTy Builder 
)

◆ EmitExplicitCastType()

void CGDebugInfo::EmitExplicitCastType ( QualType  Ty)

Emit the type explicitly casted to.

Definition at line 6083 of file CGDebugInfo.cpp.

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

◆ EmitExternalVariable()

void CGDebugInfo::EmitExternalVariable ( llvm::GlobalVariable *  GV,
const VarDecl Decl 
)

◆ EmitFuncDeclForCallSite()

void CGDebugInfo::EmitFuncDeclForCallSite ( llvm::CallBase *  CallOrInvoke,
QualType  CalleeType,
const FunctionDecl CalleeDecl 
)

Emit debug info for an extern function being called.

This is needed for call site debug info.

Definition at line 4548 of file CGDebugInfo.cpp.

References EmitFunctionDecl(), clang::Func, clang::Decl::getLocation(), clang::Decl::hasAttr(), clang::FunctionDecl::isInlined(), and clang::FunctionDecl::isStatic().

◆ EmitFunctionDecl()

void CGDebugInfo::EmitFunctionDecl ( GlobalDecl  GD,
SourceLocation  Loc,
QualType  FnType,
llvm::Function *  Fn = nullptr 
)

Emit debug info for a function declaration.

Fn is set only when a declaration for a debug call site gets created.

Definition at line 4475 of file CGDebugInfo.cpp.

References D, clang::GlobalDecl::getDecl(), clang::CodeGen::CodeGenModule::getLangOpts(), clang::CodeGen::CodeGenModule::getTarget(), clang::TargetInfo::getTriple(), clang::Decl::isImplicit(), clang::SourceLocation::isInvalid(), Loc, and true.

Referenced by EmitFuncDeclForCallSite().

◆ EmitFunctionEnd()

void CGDebugInfo::EmitFunctionEnd ( CGBuilderTy Builder,
llvm::Function *  Fn 
)

Constructs the debug code for exiting a function.

Definition at line 4658 of file CGDebugInfo.cpp.

References EmitLocation().

Referenced by EmitInlineFunctionEnd().

◆ emitFunctionStart()

void CGDebugInfo::emitFunctionStart ( GlobalDecl  GD,
SourceLocation  Loc,
SourceLocation  ScopeLoc,
QualType  FnType,
llvm::Function *  Fn,
bool  CurFnIsThunk 
)

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 4366 of file CGDebugInfo.cpp.

References D, clang::Decl::getCanonicalDecl(), clang::GlobalDecl::getDecl(), clang::GlobalDecl::getDynamicInitKind(), clang::CodeGen::CodeGenModule::getLangOpts(), clang::Decl::hasAttr(), clang::Decl::isImplicit(), clang::SourceLocation::isValid(), Loc, and clang::NoStub.

◆ EmitGlobalAlias()

void CGDebugInfo::EmitGlobalAlias ( const llvm::GlobalValue *  GV,
const GlobalDecl  Decl 
)

◆ EmitGlobalVariable() [1/2]

void CGDebugInfo::EmitGlobalVariable ( const ValueDecl VD,
const APValue Init 
)

◆ EmitGlobalVariable() [2/2]

void CGDebugInfo::EmitGlobalVariable ( llvm::GlobalVariable *  GV,
const VarDecl Decl 
)

◆ EmitImportDecl()

void CGDebugInfo::EmitImportDecl ( const ImportDecl ID)

Emit an @import declaration.

Definition at line 5946 of file CGDebugInfo.cpp.

References clang::CodeGen::CodeGenModule::getCodeGenOpts(), and Loc.

◆ EmitInlineFunctionEnd()

void CGDebugInfo::EmitInlineFunctionEnd ( CGBuilderTy Builder)

End an inlined function scope.

Definition at line 4587 of file CGDebugInfo.cpp.

References EmitFunctionEnd(), getInlinedAt(), and setInlinedAt().

Referenced by clang::CodeGen::ApplyInlineDebugLocation::~ApplyInlineDebugLocation().

◆ EmitInlineFunctionStart()

void CGDebugInfo::EmitInlineFunctionStart ( CGBuilderTy Builder,
GlobalDecl  GD 
)

Start a new scope for an inlined function.

Definition at line 4572 of file CGDebugInfo.cpp.

References EmitLocation(), clang::GlobalDecl::getDecl(), and setInlinedAt().

◆ EmitLabel()

void CGDebugInfo::EmitLabel ( const LabelDecl D,
CGBuilderTy Builder 
)

◆ EmitLexicalBlockEnd()

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 4645 of file CGDebugInfo.cpp.

References EmitLocation(), and Loc.

◆ EmitLexicalBlockStart()

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 4628 of file CGDebugInfo.cpp.

References clang::CodeGen::CodeGenModule::getLLVMContext(), Loc, and setLocation().

◆ EmitLocation()

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 4593 of file CGDebugInfo.cpp.

References clang::CodeGen::CodeGenModule::getLLVMContext(), Loc, and setLocation().

Referenced by EmitFunctionEnd(), EmitInlineFunctionStart(), and EmitLexicalBlockEnd().

◆ EmitNamespaceAlias()

llvm::DIImportedEntity * CGDebugInfo::EmitNamespaceAlias ( const NamespaceAliasDecl NA)

◆ EmitPseudoVariable()

void CGDebugInfo::EmitPseudoVariable ( CGBuilderTy Builder,
llvm::Instruction *  Value,
QualType  Ty 
)

Emit a pseudo variable and debug info for an intermediate value if it does not correspond to a variable in the source code, so that a profiler can track more accurate usage of certain instructions of interest.

Definition at line 5780 of file CGDebugInfo.cpp.

References D, clang::CodeGen::CodeGenModule::getCodeGenOpts(), and clang::CodeGen::Type.

◆ EmitUsingDecl()

void CGDebugInfo::EmitUsingDecl ( const UsingDecl UD)

◆ EmitUsingDirective()

void CGDebugInfo::EmitUsingDirective ( const UsingDirectiveDecl UD)

◆ EmitUsingEnumDecl()

void CGDebugInfo::EmitUsingEnumDecl ( const UsingEnumDecl UD)

◆ EmitUsingShadowDecl()

void CGDebugInfo::EmitUsingShadowDecl ( const UsingShadowDecl USD)

Emit a shadow decl brought in by a using or using-enum.

Definition at line 5900 of file CGDebugInfo.cpp.

References clang::Decl::getDeclContext(), clang::Decl::getLocation(), clang::NamedDecl::getUnderlyingDecl(), and Loc.

Referenced by EmitUsingDecl(), and EmitUsingEnumDecl().

◆ finalize()

void CGDebugInfo::finalize ( )

◆ getCoroutineParameterMappings()

ParamDecl2StmtTy & clang::CodeGen::CGDebugInfo::getCoroutineParameterMappings ( )
inline

Definition at line 617 of file CGDebugInfo.h.

◆ getFunctionType()

QualType CGDebugInfo::getFunctionType ( const FunctionDecl FD,
QualType  RetTy,
const SmallVectorImpl< const VarDecl * > &  Args 
)

◆ getInlinedAt()

llvm::MDNode * clang::CodeGen::CGDebugInfo::getInlinedAt ( ) const
inline
Returns
the current inline scope.

Definition at line 454 of file CGDebugInfo.h.

Referenced by EmitInlineFunctionEnd().

◆ getLocation()

SourceLocation clang::CodeGen::CGDebugInfo::getLocation ( ) const
inline

Return the current source location.

This does not necessarily correspond to the IRBuilder's current DebugLoc.

Definition at line 447 of file CGDebugInfo.h.

◆ getOrCreateInterfaceType()

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

Emit an Objective-C interface type standalone debug info.

Definition at line 2583 of file CGDebugInfo.cpp.

References D, getOrCreateStandaloneType(), and Loc.

◆ getOrCreateRecordType()

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

Emit record type's standalone debug info.

Definition at line 2576 of file CGDebugInfo.cpp.

References clang::CodeGen::CodeGenModule::getCodeGenOpts(), clang::CodeGenOptions::hasReducedDebugInfo(), Loc, and clang::T.

◆ getOrCreateStandaloneType()

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

◆ getParamDbgMappings()

Param2DILocTy & clang::CodeGen::CGDebugInfo::getParamDbgMappings ( )
inline

Definition at line 616 of file CGDebugInfo.h.

◆ registerVLASizeExpression()

void clang::CodeGen::CGDebugInfo::registerVLASizeExpression ( QualType  Ty,
llvm::Metadata *  SizeExpr 
)
inline

Register VLA size expression debug node with the qualified type.

Definition at line 421 of file CGDebugInfo.h.

◆ remapDIPath()

std::string CGDebugInfo::remapDIPath ( StringRef  Path) const

Remap a given path with the current debug prefix map.

Definition at line 483 of file CGDebugInfo.cpp.

References clang::CodeGenOptions::DebugPrefixMap, clang::CodeGen::CodeGenModule::getCodeGenOpts(), P, and Path.

◆ setDwoId()

void CGDebugInfo::setDwoId ( uint64_t  Signature)

Module debugging: Support for building PCMs.

Set the main CU's DwoId field to Signature.

Definition at line 6001 of file CGDebugInfo.cpp.

◆ setInlinedAt()

void clang::CodeGen::CGDebugInfo::setInlinedAt ( llvm::MDNode *  InlinedAt)
inline

Update the current inline scope.

All subsequent calls to EmitLocation will create a location with this inlinedAt field.

Definition at line 451 of file CGDebugInfo.h.

Referenced by EmitInlineFunctionEnd(), and EmitInlineFunctionStart().

◆ setLocation()

void CGDebugInfo::setLocation ( SourceLocation  Loc)

◆ setModuleMap()

void clang::CodeGen::CGDebugInfo::setModuleMap ( ModuleMap MMap)
inline

When generating debug information for a clang module or precompiled header, this module map will be used to determine the module of origin of each Decl.

Definition at line 433 of file CGDebugInfo.h.

◆ setPCHDescriptor()

void clang::CodeGen::CGDebugInfo::setPCHDescriptor ( ASTSourceDescriptor  PCH)
inline

When generating debug information for a clang module or precompiled header, this module map will be used to determine the module of origin of each Decl.

Definition at line 438 of file CGDebugInfo.h.

References clang::PCH.

◆ SourceLocToDebugLoc()

llvm::DebugLoc CGDebugInfo::SourceLocToDebugLoc ( SourceLocation  Loc)

Definition at line 6095 of file CGDebugInfo.cpp.

References clang::CodeGen::CodeGenModule::getLLVMContext(), and Loc.

Friends And Related Function Documentation

◆ ApplyDebugLocation

friend class ApplyDebugLocation
friend

Definition at line 59 of file CGDebugInfo.h.

◆ SaveAndRestoreLocation

friend class SaveAndRestoreLocation
friend

Definition at line 60 of file CGDebugInfo.h.


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