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

Jakob Bornecrantz via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 8 03:40:48 PDT 2016


Wallbraker requested changes to this revision.
Wallbraker added a comment.
This revision now requires changes to proceed.

I would like to see something that adds the integer and string attributes that @jyknight brought up, so we know they work before we commit to this API.


================
Comment at: include/llvm-c/Core.h:388-391
@@ +387,6 @@
+enum {
+  LLVMAttributeReturnIndex = 0U,
+  // ISO C restricts enumerator values to range of 'int'
+  // (4294967295 is too large)
+  // LLVMAttributeFunctionIndex = ~0U,
+  LLVMAttributeFunctionIndex = -1,
----------------
This will be a really annoying off by one situation, how are arguments addressed in other parts of the API, if they start with zero so should this.

Make function and return be -1 and -2.



http://reviews.llvm.org/D19181





More information about the llvm-commits mailing list