11 #include "llvm/Config/llvm-config.h" 22 return cast_or_null<DILocation>(Loc.
get());
26 assert(
get() &&
"Expected valid DebugLoc");
31 assert(
get() &&
"Expected valid DebugLoc");
32 return get()->getColumn();
36 assert(
get() &&
"Expected valid DebugLoc");
41 assert(
get() &&
"Expected valid DebugLoc");
60 return Loc->isImplicitCode();
67 Loc->setImplicitCode(ImplicitCode);
72 const MDNode *InlinedAt,
bool ImplicitCode) {
79 const_cast<MDNode *>(InlinedAt), ImplicitCode);
91 while (
DILocation *IA = CurInlinedAt->getInlinedAt()) {
93 if (
auto *Found = Cache[IA]) {
94 Last = cast<DILocation>(Found);
98 if (ReplaceLast && !IA->getInlinedAt())
109 Ctx, MD->getLine(), MD->getColumn(), MD->getScope(), Last);
114 #if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP) 124 OS <<
Scope->getFilename();
131 InlinedAtDL.print(OS);
Scope
Defines the scope in which this symbol should be visible: Default – Visible in the public interface ...
DILocation * get() const
Get the underlying DILocation.
This class represents lattice values for constants.
#define LLVM_DUMP_METHOD
Mark debug helper function definitions like dump() that should not be stripped from debug builds...
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)