[PATCH] D20171: Support for MSVS default calling convention options (/Gd, /Gz, /Gv, /Gr)

Reid Kleckner via cfe-commits cfe-commits at lists.llvm.org
Fri May 13 17:17:14 PDT 2016


rnk added inline comments.

================
Comment at: include/clang/Driver/CC1Options.td:615
@@ +614,3 @@
+  HelpText<"Set default MS calling convention">;
+def mrtd : Flag<["-"], "mrtd">, Group<m_Group>,
+  Alias<fdefault_calling_conv_EQ>, AliasArgs<["stdcall"]>,
----------------
Doesn't this have to live in Options.td if you want it to be available in the driver interface? Otherwise it's a -cc1-only flag.

================
Comment at: lib/Sema/SemaDeclAttr.cpp:3898
@@ -3897,6 +3897,3 @@
     // method calling convention.
-    TargetInfo::CallingConvMethodType MT = TargetInfo::CCMT_Unknown;
-    if (FD)
-      MT = FD->isCXXInstanceMember() ? TargetInfo::CCMT_Member : 
-                                    TargetInfo::CCMT_NonMember;
-    CC = TI.getDefaultCallingConv(MT);
+    bool isCXXMethod = false, isVariadic = false;
+    if (FD) {
----------------
Use leading upper case variables to achieve consistency with our insanity, please. :)


http://reviews.llvm.org/D20171





More information about the cfe-commits mailing list