AttributeSet from Modules


clang defines some AttributeSet, for example:

attributes #0 = { nounwind uwtable “less-precise-fpmad”=“false” “no-frame-pointer-elim”=“true” “no-frame-pointer-elim-non-leaf”=“true” “no-infs-fp-math”=“false” “no-nans-fp-math”=“false” “unsafe-fp-math”=“false” “use-soft-float”=“false” }

I would like to know if there is any way to reuse such pre-defined attribute sets (for example, set the attribute list of my new function using an existing attribute set).

Thanks in advance,

Hi Raul,

Attribute sets are "uniqued". So if you have two functions which both have the same attributes, then they will reference the same AttributeSet object.