summaryrefslogtreecommitdiffstats
path: root/llvm/include/llvm-c
diff options
context:
space:
mode:
authorAmaury Sechet <deadalnix@gmail.com>2016-04-20 01:02:12 +0000
committerAmaury Sechet <deadalnix@gmail.com>2016-04-20 01:02:12 +0000
commit60b31453ac9cc8f8c1f484d6e16ae987b7059c0c (patch)
tree323b5de9d18e6738935dd2eda61b487f5ff7e781 /llvm/include/llvm-c
parent8a57b23e8686299ce7f2695ce804eb1e54c0fbce (diff)
downloadbcm5719-llvm-60b31453ac9cc8f8c1f484d6e16ae987b7059c0c.tar.gz
bcm5719-llvm-60b31453ac9cc8f8c1f484d6e16ae987b7059c0c.zip
Add LLVMGetAttrKindID in the C API in order to facilitate migration away from LLVMAttribute
Summary: LLVMAttribute has outlived its utility and is becoming a problem for C API users that what to use all the LLVM attributes. In order to help moving away from LLVMAttribute in a smooth manner, this diff introduce LLVMGetAttrKindIDInContext, which can be used instead of the enum values. See D18749 for reference. Reviewers: Wallbraker, whitequark, joker.eph, echristo, rafael Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D19081 llvm-svn: 266842
Diffstat (limited to 'llvm/include/llvm-c')
-rw-r--r--llvm/include/llvm-c/Core.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/llvm/include/llvm-c/Core.h b/llvm/include/llvm-c/Core.h
index d9b6712ac27..0c3d76d6f9b 100644
--- a/llvm/include/llvm-c/Core.h
+++ b/llvm/include/llvm-c/Core.h
@@ -477,6 +477,19 @@ unsigned LLVMGetMDKindIDInContext(LLVMContextRef C, const char *Name,
unsigned LLVMGetMDKindID(const char *Name, unsigned SLen);
/**
+ * Return an unique id given the name of a target independent attribute,
+ * or 0 if no attribute by that name exists.
+ *
+ * See http://llvm.org/docs/LangRef.html#parameter-attributes
+ * and http://llvm.org/docs/LangRef.html#function-attributes
+ * for the list of available attributes.
+ *
+ * NB: Attribute names and/or id are subject to change without
+ * going through the C API deprecation cycle.
+ */
+unsigned LLVMGetAttrKindID(const char *Name, size_t SLen);
+
+/**
* @}
*/
OpenPOWER on IntegriCloud