Good to hear. I had proceeded with this approach and have some simple cases working (all the way through LLVM back end and generating assembly, not bad for 2 evenings work!). I had to make some guesses about all the functions that need to see “through” the ASQualType, but I figured it would be mostly similar to other types that wrap another type (Complex, Vector, etc.) with a few additions.
Also, address space qualifiers need to be parsed like other type CVR qualifiers, rather than using an attribute, because attributes seem to apply to the entire Decl irrespective of where in Decl the attribute occurs (is this purposeful, or just the current state?).
_SpaceA int * foo;
int * _SpaceA foo;
Also, the TR specifies that the names of address spaces are in the type namespace. My question is, does that mean there also needs to be an AddressSpaceType class?
The LLVM infrastructure supports a limited number of address spaces (N) and I was planning on having built in support for qualifiers of the form ‘_AddressSpace#’ for all N. The TR says that a means to define new address spaces may be provided by the compiler, and if there are in-fact AddressSpaceType’s would it be reasonable to think that a typedef would be the correct means of binding a name to a numbered AddressSpace?
typedef _AddressSpace12 twelfth_space;
typedef _AddressSpace12 space_12;
also, this would allow the compiler to be “preloaded” with typedefs for memory spaces based on the target, would it not?