12 #include "llvm/Config/llvm-config.h" 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) 111 auto *Scope = cast<DIScope>(
getScope());
112 OS << Scope->getFilename();
119 InlinedAtDL.print(OS);
void push_back(const T &Elt)
DILocation * get() const
Get the underlying DILocation.
Compute iterated dominance frontiers using a linear time algorithm.
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-...
#define LLVM_DUMP_METHOD
Mark debug helper function definitions like dump() that should not be stripped from debug builds...
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.
DISubprogram * getDISubprogram(const MDNode *Scope)
Find subprogram that is enclosing this scope.
auto reverse(ContainerTy &&C, typename std::enable_if< has_rbegin< ContainerTy >::value >::type *=nullptr) -> decltype(make_range(C.rbegin(), C.rend()))
LLVMContext & getContext() const
static MDTuple * get(LLVMContext &Context, ArrayRef< Metadata *> MDs)
This is an important class for using LLVM in a threaded context.
static MDTuple * getDistinct(LLVMContext &Context, ArrayRef< Metadata *> MDs)
MDNode * getScope() const
DILocation * getInlinedAt() const
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
DebugLoc getFnDebugLoc() const
Find the debug info location for the start of the function.
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
This class implements an extremely fast bulk output stream that can only output to a stream...