[PATCH] D19181: Map Attribute in the C API.

Amaury SECHET via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 11 17:35:12 PDT 2016


deadalnix added inline comments.

================
Comment at: include/llvm-c/Core.h:531
@@ +530,3 @@
+ */
+const char *LLVMGetAttributeKindAsString(LLVMAttributeRef A, unsigned *Length);
+
----------------
whitequark wrote:
> deadalnix wrote:
> > whitequark wrote:
> > > Does this allocate? If yes, needs to be mentioned in the docstring I think (etc etc LLVMDisposeString etc etc)
> > It doesn't.
> Needs a mention anyway (since most other functions do allocate).
We have done it the other way around when it allocate in the past. Function that allocate mention what dispose function you need to call to free the string. Most function returning a string do not transfers ownership.


http://reviews.llvm.org/D19181





More information about the llvm-commits mailing list