DmitryPolukhin added inline comments. ================ Comment at: lib/AST/ItaniumMangle.cpp:321-323 @@ +320,5 @@ + // track. + // + // FIXME: how to handle substituted names? They should add the tags used in + // the substitution to the list of available tags. + class AbiTagState final { ---------------- rsmith wrote: > Do we need to? IIUC, the only time we need this list is when determining the > set of "available" tags for a function declaration with a tagged return type, > and in that case, a tag can only be available from a substitution if it's > also available from the target of that substitution (right?). It is not only for functions but also for variables but yes, as far as I understand, substitution itself cannot add tags and target should have all tags. I removed FIXME.
================ Comment at: lib/AST/ItaniumMangle.cpp:348-361 @@ +347,16 @@ + + void pop() { + if (!LinkActive) + return; + + assert(LinkHead == this && + "abi tag link head must point to us on destruction"); + LinkActive = false; + if (Parent) { + Parent->UsedAbiTags.insert(UsedAbiTags.begin(), UsedAbiTags.end()); + Parent->EmittedAbiTags.insert(EmittedAbiTags.begin(), + EmittedAbiTags.end()); + } + LinkHead = Parent; + } + ---------------- rsmith wrote: > Why do we need a stack of these? It seems like we only need one set of > available tags for the complete mangling process (it should only be used once > at the top level). Stack is required for mangling local names. In that case we have more than one list of available tags and it can be enclosed. http://reviews.llvm.org/D18035 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits