[libc-commits] [libc] [libc][RFC] add support for function level attributes (PR #79891)
Nick Desaulniers via libc-commits
libc-commits at lists.llvm.org
Tue Jan 30 08:48:53 PST 2024
================
@@ -169,10 +169,30 @@ class ArgSpec<Type type, list<Annotation> annotations = [], string name = ""> {
string Name = name;
}
-class FunctionSpec<string name, RetValSpec return, list<ArgSpec> args> {
+class FunctionAttr {}
+class GnuFunctionAttr<string attr> : FunctionAttr {
+ string Attr = attr;
+ string Style = "gnu";
+}
+class Cxx11FunctionAttr<string attr, string namespace> : FunctionAttr {
+ string Attr = attr;
+ string Namespace = namespace;
+ string Style = "cxx11";
+}
+class DeclspecFunctionAttr<string attr> : FunctionAttr {
+ string Attr = attr;
+ string Style = "declspec";
----------------
nickdesaulniers wrote:
It would be good to clarify (via comments in source) what you mean by `Style`. I know, but I want you to be explicit for everyone.
https://github.com/llvm/llvm-project/pull/79891
More information about the libc-commits
mailing list