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/lib/IR/Core.cpp | |
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/lib/IR/Core.cpp')
-rw-r--r-- | llvm/lib/IR/Core.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/llvm/lib/IR/Core.cpp b/llvm/lib/IR/Core.cpp index 997f5330dec..44291a1784d 100644 --- a/llvm/lib/IR/Core.cpp +++ b/llvm/lib/IR/Core.cpp @@ -3006,6 +3006,17 @@ void LLVMDisposeBuilder(LLVMBuilderRef Builder) { /*--.. Metadata builders ...................................................--*/ +LLVMMetadataRef LLVMGetCurrentDebugLocation2(LLVMBuilderRef Builder) { + return wrap(unwrap(Builder)->getCurrentDebugLocation().getAsMDNode()); +} + +void LLVMSetCurrentDebugLocation2(LLVMBuilderRef Builder, LLVMMetadataRef Loc) { + if (Loc) + unwrap(Builder)->SetCurrentDebugLocation(DebugLoc(unwrap<MDNode>(Loc))); + else + unwrap(Builder)->SetCurrentDebugLocation(DebugLoc()); +} + void LLVMSetCurrentDebugLocation(LLVMBuilderRef Builder, LLVMValueRef L) { MDNode *Loc = L ? cast<MDNode>(unwrap<MetadataAsValue>(L)->getMetadata()) : nullptr; @@ -3022,7 +3033,6 @@ void LLVMSetInstDebugLocation(LLVMBuilderRef Builder, LLVMValueRef Inst) { unwrap(Builder)->SetInstDebugLocation(unwrap<Instruction>(Inst)); } - /*--.. Instruction builders ................................................--*/ LLVMValueRef LLVMBuildRetVoid(LLVMBuilderRef B) { |