class DebugLoc

Declaration

class DebugLoc { /* full declaration omitted */ };

Description

A debug info location. This class is a wrapper around a tracking reference to an \a DILocation pointer. To avoid extra includes, \a DebugLoc doubles the \a DILocation API with a one based on relatively opaque \a MDNode pointers.

Declared at: llvm/include/llvm/IR/DebugLoc.h:33

Member Variables

private llvm::TrackingMDNodeRef Loc

Method Overview

Methods

DebugLoc(const llvm::DILocation* L)

Description

Construct from an \a DILocation.

Declared at: llvm/include/llvm/IR/DebugLoc.h:40

Parameters

const llvm::DILocation* L

DebugLoc(const llvm::MDNode* N)

Description

Construct from an \a MDNode. Note: if \c N is not an \a DILocation, a verifier check will fail, and accessors will crash. However, construction from other nodes is supported in order to handle forward references when reading textual IR.

Declared at: llvm/include/llvm/IR/DebugLoc.h:48

Parameters

const llvm::MDNode* N

DebugLoc()

Declared at: llvm/include/llvm/IR/DebugLoc.h:37

static llvm::DebugLoc appendInlinedAt(
    const llvm::DebugLoc& DL,
    llvm::DILocation* InlinedAt,
    llvm::LLVMContext& Ctx,
    DenseMap<const llvm::MDNode*, llvm::MDNode*>&
        Cache)

Description

Rebuild the entire inlined-at chain for this instruction so that the top of the chain now is inlined-at the new call site.

Declared at: llvm/include/llvm/IR/DebugLoc.h:75

Parameters

const llvm::DebugLoc& DL
llvm::DILocation* InlinedAt
The new outermost inlined-at in the chain.
llvm::LLVMContext& Ctx
DenseMap<const llvm::MDNode*, llvm::MDNode*>& Cache

void dump() const

Declared at: llvm/include/llvm/IR/DebugLoc.h:108

llvm::DILocation* get() const

Description

Get the underlying \a DILocation.

Declared at: llvm/include/llvm/IR/DebugLoc.h:54

llvm::MDNode* getAsMDNode() const

Description

Return \c this as a bar \a MDNode.

Declared at: llvm/include/llvm/IR/DebugLoc.h:99

unsigned int getCol() const

Declared at: llvm/include/llvm/IR/DebugLoc.h:80

llvm::DebugLoc getFnDebugLoc() const

Description

Find the debug info location for the start of the function. Walk up the scope chain of given debug loc and find line number info for the function. FIXME: Remove this. Users should use DILocation/DILocalScope API to find the subprogram, and then DILocation::get().

Declared at: llvm/include/llvm/IR/DebugLoc.h:96

llvm::DILocation* getInlinedAt() const

Declared at: llvm/include/llvm/IR/DebugLoc.h:82

llvm::MDNode* getInlinedAtScope() const

Description

Get the fully inlined-at scope for a DebugLoc. Gets the inlined-at scope for a DebugLoc.

Declared at: llvm/include/llvm/IR/DebugLoc.h:87

unsigned int getLine() const

Declared at: llvm/include/llvm/IR/DebugLoc.h:79

llvm::MDNode* getScope() const

Declared at: llvm/include/llvm/IR/DebugLoc.h:81

bool hasTrivialDestructor() const

Description

Check whether this has a trivial destructor.

Declared at: llvm/include/llvm/IR/DebugLoc.h:69

bool isImplicitCode() const

Description

Check if the DebugLoc corresponds to an implicit code.

Declared at: llvm/include/llvm/IR/DebugLoc.h:102

bool operator bool() const

Description

Check for null. Check for null in a way that is safe with broken debug info. Unlike the conversion to \c DILocation, this doesn't require that \c Loc is of the right type. Important for cases like \a llvm::StripDebugInfo() and\a Instruction::hasMetadata().

Declared at: llvm/include/llvm/IR/DebugLoc.h:66

llvm::DILocation* operator llvm::DILocation*()
    const

Declared at: llvm/include/llvm/IR/DebugLoc.h:55

void print(llvm::raw_ostream& OS) const

Description

prints source location /path/to/file.exe:line:col @ [inlined at]

Declared at: llvm/include/llvm/IR/DebugLoc.h:111

Parameters

llvm::raw_ostream& OS

void setImplicitCode(bool ImplicitCode)

Declared at: llvm/include/llvm/IR/DebugLoc.h:103

Parameters

bool ImplicitCode