rsmith added inline comments.

================
Comment at: lib/AST/MicrosoftMangle.cpp:1061
+    if (Ty->getAs<FunctionType>()->getCallConv() == CC_Swift)
+      for (const char *NS : {"__swift_cc", "__Swift"})
+        mangleSourceName(NS);
----------------
Do we really need both of these qualifiers? This seems redundant to me.


================
Comment at: lib/AST/MicrosoftMangle.cpp:1717
+        Out << '8';
+        for (const char *NS : {"__swift_cc", "__Swift"})
+          mangleSourceName(NS);
----------------
erichkeane wrote:
> When I implemented regcall, it was brought up that this was likely a bad 
> idea, and to just choose a letter for mangleCallingConvention.  It is a 
> really stable list as it is, and if you avoid ones in the immediate pattern, 
> you'll be fine.
If you can get someone at Microsoft to sign off on us using a specific letter, 
that seems fine. Otherwise, because we don't define the ABI, we don't get to 
invent extensions to it, and we should instead pick something (like this) that 
we can be confident won't conflict with future official mangling extensions


Repository:
  rC Clang

https://reviews.llvm.org/D42768



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

Reply via email to