summaryrefslogtreecommitdiffstats
path: root/llvm/include/llvm-c
diff options
context:
space:
mode:
authorRobert Widmann <devteam.codafi@gmail.com>2019-04-09 22:27:51 +0000
committerRobert Widmann <devteam.codafi@gmail.com>2019-04-09 22:27:51 +0000
commitbec0a45ddce61abcf92db73dbb13867c270ee23e (patch)
treea8e3e07950bbebf1f691989ca13e239dd02c2248 /llvm/include/llvm-c
parentd1ba3b13f83ebb7a76b62cacb1a97006c8d9f4b3 (diff)
downloadbcm5719-llvm-bec0a45ddce61abcf92db73dbb13867c270ee23e.tar.gz
bcm5719-llvm-bec0a45ddce61abcf92db73dbb13867c270ee23e.zip
[LLVM-C] Add Bindings to Access an Instruction's DebugLoc
Summary: Provide direct accessors to supplement LLVMSetInstDebugLocation. In addition, properly accept and return the NULL location. The old accessors provided no way to do this, so the current debug location cannot currently be cleared. Reviewers: whitequark, deadalnix Reviewed By: whitequark Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60481 llvm-svn: 358038
Diffstat (limited to 'llvm/include/llvm-c')
-rw-r--r--llvm/include/llvm-c/DebugInfo.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/llvm/include/llvm-c/DebugInfo.h b/llvm/include/llvm-c/DebugInfo.h
index 99e977da15e..655b80d2796 100644
--- a/llvm/include/llvm-c/DebugInfo.h
+++ b/llvm/include/llvm-c/DebugInfo.h
@@ -1193,6 +1193,22 @@ LLVMMetadataRef LLVMGetSubprogram(LLVMValueRef Func);
void LLVMSetSubprogram(LLVMValueRef Func, LLVMMetadataRef SP);
/**
+ * Get the debug location for the given instruction.
+ *
+ * @see llvm::Instruction::getDebugLoc()
+ */
+LLVMMetadataRef LLVMInstructionGetDebugLoc(LLVMValueRef Inst);
+
+/**
+ * Set the debug location for the given instruction.
+ *
+ * To clear the location metadata of the given instruction, pass NULL to \p Loc.
+ *
+ * @see llvm::Instruction::setDebugLoc()
+ */
+void LLVMInstructionSetDebugLoc(LLVMValueRef Inst, LLVMMetadataRef Loc);
+
+/**
* Obtain the enumerated type of a Metadata instance.
*
* @see llvm::Metadata::getMetadataID()
OpenPOWER on IntegriCloud