On Sep 30, 2012, at 20:41 , Douglas Gregor <[email protected]> wrote:
>> + Result << "<Availability";
>> + StringRef distribution;
>> + if (AA->getPlatform()) {
>> + distribution = AA->getPlatform()->getName();
>> + if (distribution == "macosx")
>> + distribution = "OSX";
>> + else
>> + distribution = "iOS";
>> + }
>
> I agree with Dmitri, and suggest here that you map macosx -> OS X, ios ->
> iOS, and pass through the other names. Isn't there already code to do this in
> the AST library? Can it be abstracted nicely?
I think what makes it tricky (read: hardcoded) is that these have to be XML
node names, i.e. no spaces and few special characters. It's too bad they can't
be attributes, though:
<Availability platform="ios">...</Availability>
...but we're going for compatibility with an existing format (if internal).
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits