aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/IR/DebugLoc.h
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-05-16 19:46:52 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-05-16 19:46:52 +0000
commit6b3f41ed88e8e440e11a4fbf20b6600529f80049 (patch)
tree928b056f24a634d628c80238dbbf10d41b1a71d5 /include/llvm/IR/DebugLoc.h
parentc46e6a5940c50058e00c0c5f9123fd82e338d29a (diff)
Diffstat (limited to 'include/llvm/IR/DebugLoc.h')
-rw-r--r--include/llvm/IR/DebugLoc.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/llvm/IR/DebugLoc.h b/include/llvm/IR/DebugLoc.h
index 202be3da14da..aa74f361cda2 100644
--- a/include/llvm/IR/DebugLoc.h
+++ b/include/llvm/IR/DebugLoc.h
@@ -80,6 +80,22 @@ namespace llvm {
static DebugLoc get(unsigned Line, unsigned Col, const MDNode *Scope,
const MDNode *InlinedAt = nullptr);
+ enum { ReplaceLastInlinedAt = true };
+ /// Rebuild the entire inlined-at chain for this instruction so that the top of
+ /// the chain now is inlined-at the new call site.
+ /// \param InlinedAt The new outermost inlined-at in the chain.
+ /// \param ReplaceLast Replace the last location in the inlined-at chain.
+ static DebugLoc appendInlinedAt(DebugLoc DL, DILocation *InlinedAt,
+ LLVMContext &Ctx,
+ DenseMap<const MDNode *, MDNode *> &Cache,
+ bool ReplaceLast = false);
+
+ /// Reparent all debug locations referenced by \c I that belong to \c OrigSP
+ /// to become (possibly indirect) children of \c NewSP.
+ static void reparentDebugInfo(Instruction &I, DISubprogram *OrigSP,
+ DISubprogram *NewSP,
+ DenseMap<const MDNode *, MDNode *> &Cache);
+
unsigned getLine() const;
unsigned getCol() const;
MDNode *getScope() const;