Go to the documentation of this file.
10 #include "llvm/Config/llvm-config.h"
21 return cast_or_null<DILocation>(Loc.
get());
25 assert(
get() &&
"Expected valid DebugLoc");
26 return get()->getLine();
30 assert(
get() &&
"Expected valid DebugLoc");
31 return get()->getColumn();
35 assert(
get() &&
"Expected valid DebugLoc");
36 return get()->getScope();
40 assert(
get() &&
"Expected valid DebugLoc");
41 return get()->getInlinedAt();
45 return cast<DILocation>(Loc)->getInlinedAtScope();
59 return Loc->isImplicitCode();
66 Loc->setImplicitCode(ImplicitCode);
78 while (
DILocation *IA = CurInlinedAt->getInlinedAt()) {
80 if (
auto *Found = Cache[IA]) {
81 Last = cast<DILocation>(Found);
85 InlinedAtLocations.push_back(IA);
94 Ctx, MD->getLine(), MD->getColumn(), MD->getScope(), Last);
99 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
109 OS <<
Scope->getFilename();
116 InlinedAtDL.print(OS);
#define LLVM_DUMP_METHOD
Mark debug helper function definitions like dump() that should not be stripped from debug builds.
This is an optimization pass for GlobalISel generic memory operations.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
DISubprogram * getDISubprogram(const MDNode *Scope)
Find subprogram that is enclosing this scope.
DILocation * getInlinedAt() const
auto reverse(ContainerTy &&C, std::enable_if_t< has_rbegin< ContainerTy >::value > *=nullptr)
static MDTuple * get(LLVMContext &Context, ArrayRef< Metadata * > MDs)
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
DebugLoc getFnDebugLoc() const
Find the debug info location for the start of the function.
This class implements an extremely fast bulk output stream that can only output to a stream.
static DebugLoc appendInlinedAt(const DebugLoc &DL, DILocation *InlinedAt, LLVMContext &Ctx, DenseMap< const MDNode *, MDNode * > &Cache)
Rebuild the entire inlined-at chain for this instruction so that the top of the chain now is inlined-...
This is an important class for using LLVM in a threaded context.
DILocation * get() const
Get the underlying DILocation.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
Scope
Defines the scope in which this symbol should be visible: Default – Visible in the public interface o...
void setImplicitCode(bool ImplicitCode)
bool isImplicitCode() const
Check if the DebugLoc corresponds to an implicit code.
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
static MDTuple * getDistinct(LLVMContext &Context, ArrayRef< Metadata * > MDs)
void print(raw_ostream &OS) const
prints source location /path/to/file.exe:line:col @[inlined at]
MDNode * getInlinedAtScope() const
Get the fully inlined-at scope for a DebugLoc.
MDNode * getScope() const