summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorRobert Widmann <devteam.codafi@gmail.com>2019-04-24 17:05:08 +0000
committerRobert Widmann <devteam.codafi@gmail.com>2019-04-24 17:05:08 +0000
commit09c5b883cb7ac66cb34d33291586a1055e0c816d (patch)
tree8881f00cf2945ff0e3c460d962156ab17c009c51 /llvm/lib
parentcee607e4144e6391472e04235479969d9b0408a2 (diff)
downloadbcm5719-llvm-09c5b883cb7ac66cb34d33291586a1055e0c816d.tar.gz
bcm5719-llvm-09c5b883cb7ac66cb34d33291586a1055e0c816d.zip
[LLVM-C] Deprecate the LLVMValueRef-returning metadata creation functions
Summary: There is still some value in using these functions while the remaining LLVMValueRef-based accessors are still around, but LLVMMDNodeInContext in particular has some wonky semantics that make it worth replacing outright. Reviewers: whitequark, deadalnix Reviewed By: whitequark Subscribers: hiraditya, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D60524 llvm-svn: 359114
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/IR/Core.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/lib/IR/Core.cpp b/llvm/lib/IR/Core.cpp
index 354921dc43e..310935b5213 100644
--- a/llvm/lib/IR/Core.cpp
+++ b/llvm/lib/IR/Core.cpp
@@ -1036,6 +1036,16 @@ LLVMValueRef LLVMConstPointerNull(LLVMTypeRef Ty) {
/*--.. Operations on metadata nodes ........................................--*/
+LLVMMetadataRef LLVMMDStringInContext2(LLVMContextRef C, const char *Str,
+ size_t SLen) {
+ return wrap(MDString::get(*unwrap(C), StringRef(Str, SLen)));
+}
+
+LLVMMetadataRef LLVMMDNodeInContext2(LLVMContextRef C, LLVMMetadataRef *MDs,
+ size_t Count) {
+ return wrap(MDNode::get(*unwrap(C), ArrayRef<Metadata*>(unwrap(MDs), Count)));
+}
+
LLVMValueRef LLVMMDStringInContext(LLVMContextRef C, const char *Str,
unsigned SLen) {
LLVMContext &Context = *unwrap(C);
OpenPOWER on IntegriCloud