<div dir="ltr"><div><div><div><div><div><div>So one of the big blind spot of the C API is LLVM attributes. Not only a subset of attribute only are usable from C, but they can't be used in various position (like function return).<br><br></div>There are various approach to go with this, and I'm willing to do the work, but i'm not sure which one we should prefers.<br><br></div>Here are solution I considered:<br><br></div>1/ Extend the generation from Attribute.td to generate an enum for the C API so we can access AttrKind from there. The problem is that i'm not sure values in there will be conserved over time. I'd assume they need to for bytecode backward compatibility ?<br><br></div>2/ Add binding for AttributeSet. Not sure it solves the problem of AttrKind in any way, so not sure it is viable.<br><br></div>3/ Double down on current approach, but that mean we will accumulate crap in AttrBuilder::addRawValue over time. Maybe we are ok with that.<br><br></div>Thought ?<br></div>