[PATCH] D47179: [LLVM-C] Add Bindings For Named Metadata

Jakob Bornecrantz via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 27 10:37:58 PDT 2018


Wallbraker added inline comments.


================
Comment at: include/llvm-c/Core.h:898
+ */
+const char *LLVMGetNamedMetadataName(LLVMNamedMDNodeRef NamedMD, size_t *NameLen);
+
----------------
CodaFi wrote:
> Wallbraker wrote:
> > Should this be disposed with LLVMDisposeMessage? Please update comment to reflect this.
> No.  In general, `Get`-named things return objects managed by somebody else.  `Copy`-named things (or, unfortunately, functions documented to the contrary) return user-owned objects.  In this case, the module owns the named metadata which owns its name.
Ah okay, so it's not consistent over the API? Even more reason to put it in the doc-comment of this function.


https://reviews.llvm.org/D47179





More information about the llvm-commits mailing list