diff options
author | Robert Widmann <devteam.codafi@gmail.com> | 2019-04-10 14:19:05 +0000 |
---|---|---|
committer | Robert Widmann <devteam.codafi@gmail.com> | 2019-04-10 14:19:05 +0000 |
commit | cce47418c93bcd178379fa8c4df5c3327bc19802 (patch) | |
tree | 9c0aa74813e31280dd180e8d785441dd4a450d5e /llvm/include/llvm-c | |
parent | aae424a2d2669bc2167a6983fd0dba07fae40cff (diff) | |
download | bcm5719-llvm-cce47418c93bcd178379fa8c4df5c3327bc19802.tar.gz bcm5719-llvm-cce47418c93bcd178379fa8c4df5c3327bc19802.zip |
[LLVM-C] Correct The Current Debug Location Accessors (Again)
Summary: Resubmitting D60484 with the conflicting Go bindings renamed to avoid collisions.
Reviewers: whitequark, deadalnix
Subscribers: hiraditya, llvm-commits, sammccall
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D60511
llvm-svn: 358086
Diffstat (limited to 'llvm/include/llvm-c')
-rw-r--r-- | llvm/include/llvm-c/Core.h | 35 | ||||
-rw-r--r-- | llvm/include/llvm-c/DebugInfo.h | 9 |
2 files changed, 43 insertions, 1 deletions
diff --git a/llvm/include/llvm-c/Core.h b/llvm/include/llvm-c/Core.h index 6adb4d80011..3d153d50aa9 100644 --- a/llvm/include/llvm-c/Core.h +++ b/llvm/include/llvm-c/Core.h @@ -3510,9 +3510,42 @@ void LLVMInsertIntoBuilderWithName(LLVMBuilderRef Builder, LLVMValueRef Instr, void LLVMDisposeBuilder(LLVMBuilderRef Builder); /* Metadata */ + +/** + * Get location information used by debugging information. + * + * @see llvm::IRBuilder::getCurrentDebugLocation() + */ +LLVMMetadataRef LLVMGetCurrentDebugLocation2(LLVMBuilderRef Builder); + +/** + * Set location information used by debugging information. + * + * To clear the location metadata of the given instruction, pass NULL to \p Loc. + * + * @see llvm::IRBuilder::SetCurrentDebugLocation() + */ +void LLVMSetCurrentDebugLocation2(LLVMBuilderRef Builder, LLVMMetadataRef Loc); + +/** + * Attempts to set the debug location for the given instruction using the + * current debug location for the given builder. If the builder has no current + * debug location, this function is a no-op. + * + * @see llvm::IRBuilder::SetInstDebugLocation() + */ +void LLVMSetInstDebugLocation(LLVMBuilderRef Builder, LLVMValueRef Inst); + +/** + * Deprecated: Passing the NULL location will crash. + * Use LLVMGetCurrentDebugLocation2 instead. + */ void LLVMSetCurrentDebugLocation(LLVMBuilderRef Builder, LLVMValueRef L); +/** + * Deprecated: Returning the NULL location will crash. + * Use LLVMGetCurrentDebugLocation2 instead. + */ LLVMValueRef LLVMGetCurrentDebugLocation(LLVMBuilderRef Builder); -void LLVMSetInstDebugLocation(LLVMBuilderRef Builder, LLVMValueRef Inst); /* Terminators */ LLVMValueRef LLVMBuildRetVoid(LLVMBuilderRef); diff --git a/llvm/include/llvm-c/DebugInfo.h b/llvm/include/llvm-c/DebugInfo.h index 655b80d2796..d613a26e95e 100644 --- a/llvm/include/llvm-c/DebugInfo.h +++ b/llvm/include/llvm-c/DebugInfo.h @@ -452,6 +452,15 @@ unsigned LLVMDILocationGetColumn(LLVMMetadataRef Location); LLVMMetadataRef LLVMDILocationGetScope(LLVMMetadataRef Location); /** + * Get the "inline at" location associated with this debug location. + * \param Location The debug location. + * + * @see DILocation::getInlinedAt() + */ +LLVMMetadataRef LLVMDILocationGetInlinedAt(LLVMMetadataRef Location); + + +/** * Create a type array. * \param Builder The DIBuilder. * \param Data The type elements. |