diff options
author | Amaury Sechet <deadalnix@gmail.com> | 2017-04-17 11:52:54 +0000 |
---|---|---|
committer | Amaury Sechet <deadalnix@gmail.com> | 2017-04-17 11:52:54 +0000 |
commit | f8429754d8a30eac5203cb4438ca8d9375cf1f8e (patch) | |
tree | 0597b48678f329a1c5ac0ea63ec58e222ff41494 /llvm/include/llvm-c/Core.h | |
parent | 751579cac0cf426a72d29c5959b5bb8236c7f0fb (diff) | |
download | bcm5719-llvm-f8429754d8a30eac5203cb4438ca8d9375cf1f8e.tar.gz bcm5719-llvm-f8429754d8a30eac5203cb4438ca8d9375cf1f8e.zip |
Introducing LLVMMetadataRef
Summary:
This seems like an uncontroversial first step toward providing access to the metadata hierarchy that now exists in LLVM. This should allow for good debug info support from C.
Future plans are to deprecate API that take mixed bags of values and metadata (mainly the LLVMMDNode family of functions) and migrate the rest toward the use of LLVMMetadataRef.
Once this is in place, mapping of DIBuilder will be able to start.
Reviewers: mehdi_amini, echristo, whitequark, jketema, Wallbraker
Reviewed By: Wallbraker
Subscribers: Eugene.Zelenko, axw, mehdi_amini, llvm-commits
Differential Revision: https://reviews.llvm.org/D19448
llvm-svn: 300447
Diffstat (limited to 'llvm/include/llvm-c/Core.h')
-rw-r--r-- | llvm/include/llvm-c/Core.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/include/llvm-c/Core.h b/llvm/include/llvm-c/Core.h index 7f5c05d21e6..0a1d8faf99b 100644 --- a/llvm/include/llvm-c/Core.h +++ b/llvm/include/llvm-c/Core.h @@ -2131,6 +2131,16 @@ LLVMValueRef LLVMMDNodeInContext(LLVMContextRef C, LLVMValueRef *Vals, LLVMValueRef LLVMMDNode(LLVMValueRef *Vals, unsigned Count); /** + * Obtain a Metadata as a Value. + */ +LLVMValueRef LLVMMetadataAsValue(LLVMContextRef C, LLVMMetadataRef MD); + +/** + * Obtain a Value as a Metadata. + */ +LLVMMetadataRef LLVMValueAsMetadata(LLVMValueRef Val); + +/** * Obtain the underlying string from a MDString value. * * @param V Instance to obtain string from. |