23 return cast_or_null<DILocation>(Loc.
get());
27 assert(
get() &&
"Expected valid DebugLoc");
32 assert(
get() &&
"Expected valid DebugLoc");
33 return get()->getColumn();
37 assert(
get() &&
"Expected valid DebugLoc");
42 assert(
get() &&
"Expected valid DebugLoc");
66 const_cast<MDNode *
>(Scope),
67 const_cast<MDNode *>(InlinedAt));
79 while (
DILocation *IA = CurInlinedAt->getInlinedAt()) {
81 if (
auto *Found = Cache[IA]) {
82 Last = cast<DILocation>(Found);
86 if (ReplaceLast && !IA->getInlinedAt())
97 Ctx, MD->getLine(), MD->getColumn(), MD->getScope(), Last);
102 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
123 auto *Scope = cast<DIScope>(
getScope());
124 OS << Scope->getFilename();
131 InlinedAtDL.print(OS);
void push_back(const T &Elt)
MDNode * getScope() const
#define LLVM_DUMP_METHOD
Mark debug helper function definitions like dump() that should not be stripped from debug builds...
static MDTuple * getDistinct(LLVMContext &Context, ArrayRef< Metadata * > MDs)
DebugLoc getFnDebugLoc() const
Find the debug info location for the start of the function.
DILocation * get() const
Get the underlying DILocation.
DISubprogram * getDISubprogram(const MDNode *Scope)
Find subprogram that is enclosing this scope.
void print(raw_ostream &OS) const
prints source location /path/to/file.exe:line:col @[inlined at]
auto reverse(ContainerTy &&C, typename std::enable_if< has_rbegin< ContainerTy >::value >::type *=nullptr) -> decltype(make_range(C.rbegin(), C.rend()))
This is an important class for using LLVM in a threaded context.
MDNode * getInlinedAtScope() const
Get the fully inlined-at scope for a DebugLoc.
DILocation * getInlinedAt() const
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
static MDTuple * get(LLVMContext &Context, ArrayRef< Metadata * > MDs)
LLVMContext & getContext() const
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
This class implements an extremely fast bulk output stream that can only output to a stream...
static DebugLoc appendInlinedAt(DebugLoc DL, DILocation *InlinedAt, LLVMContext &Ctx, DenseMap< const MDNode *, MDNode * > &Cache, bool ReplaceLast=false)
Rebuild the entire inlined-at chain for this instruction so that the top of the chain now is inlined-...