[PATCH] [ms-cxxabi] Use x86_cdeclmethodcc for __cdecl methods on win32

Richard Smith richard at metafoo.co.uk
Thu Jan 30 16:30:47 PST 2014


  This seems pretty horrible, but I don't see a better way. =(


================
Comment at: lib/CodeGen/CGCall.cpp:415-418
@@ -411,6 +414,6 @@
 const CGFunctionInfo &
 CodeGenTypes::arrangeFunctionDeclaration(QualType resultType,
                                          const FunctionArgList &args,
                                          const FunctionType::ExtInfo &info,
                                          bool isVariadic) {
   // FIXME: Kill copy.
----------------
(I assume you've checked this is only called for non-member functions.) Can we rename this arrangeFreeFunctionDeclaration or similar?

================
Comment at: lib/CodeGen/CodeGenABITypes.cpp:67
@@ -66,3 +66,3 @@
                                          RequiredArgs args) {
-  return CGM->getTypes().arrangeLLVMFunctionInfo(returnType, argTypes,
-                                                info, args);
+  // We assume callers don't use this to get the LLVM types for C++ methods.
+  bool IsInstanceMethod = false;
----------------
Likewise, can we express this in the function name?


http://llvm-reviews.chandlerc.com/D2664



More information about the cfe-commits mailing list