smeenai requested review of this revision.
smeenai added a comment.

Actually, I take that back ... I just misread the stack trace.

There are a bunch of hops between the `mangleCXXRTTI` call and the ultimate 
mangling function:

  MicrosoftMangleContextImpl::mangleCXXRTTI(QualType, raw_ostream &)
  MicrosoftCXXNameMangler::mangleType(QualType, SourceRange, 
QualifierMangleMode)
  MicrosoftCXXNameMangler::mangleType(const ObjCObjectPointerType *, 
Qualifiers, SourceRange)
  MicrosoftCXXNameMangler::mangleType(QualType, SourceRange, 
QualifierMangleMode)
  MicrosoftCXXNameMangler::mangleType(const ObjCObjectType *, Qualifiers, 
SourceRange)

(the last one will be `ObjCInterfaceType` instead of `ObjCObjectType` if 
catching anything other than `id`)

Threading a `ForRTTI` flag or similar all the way to the final call seems 
pretty tricky. I can add an optional paramater to `mangleType(QualType, 
SourceRange, QualifierMangleMode)`, but that function uses a generated switch 
case 
<https://reviews.llvm.org/diffusion/L/browse/cfe/trunk/lib/AST/MicrosoftMangle.cpp;343652$1833-1847>
 to call the specific `mangleType` functions, and I don't know how to 
special-case certain types in that switch case (to pass the extra parameter 
along) without doing something super ugly. Adding the extra parameter to every 
single `mangleType` overload seems highly non-ideal, which is why I was 
thinking of maintaining some internal state instead.


Repository:
  rC Clang

https://reviews.llvm.org/D52674



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to