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");
61 return Loc->isImplicitCode();
68 Loc->setImplicitCode(ImplicitCode);
73 const MDNode *InlinedAt,
bool ImplicitCode) {
79 const_cast<MDNode *
>(Scope),
80 const_cast<MDNode *>(InlinedAt), ImplicitCode);
92 while (
DILocation *IA = CurInlinedAt->getInlinedAt()) {
94 if (
auto *Found = Cache[IA]) {
95 Last = cast<DILocation>(Found);
99 if (ReplaceLast && !IA->getInlinedAt())
110 Ctx, MD->getLine(), MD->getColumn(), MD->getScope(), Last);
115 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) 124 auto *Scope = cast<DIScope>(
getScope());
125 OS << Scope->getFilename();
132 InlinedAtDL.print(OS);
DILocation * get() const
Get the underlying DILocation.
This class represents lattice values for constants.
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-...
void push_back(const T &Elt)
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.
bool isImplicitCode() const
Check if the DebugLoc corresponds to an implicit code.
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...
void setImplicitCode(bool ImplicitCode)