__fastcall and __stdcall are mingw extensions to gcc for windows. Use the
authorNick Lewycky <nicholas@mxc.ca>
Wed, 26 Nov 2008 03:17:27 +0000 (03:17 +0000)
committerNick Lewycky <nicholas@mxc.ca>
Wed, 26 Nov 2008 03:17:27 +0000 (03:17 +0000)
__attribute__ notation which is supported on more platforms.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60083 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/CBackend/CBackend.cpp

index e8804dcad2768de77d3f2ffda877027cc4b47ee6..cbdbdcd811ab82a8663d1a2d6671e5197fde04c6 100644 (file)
@@ -2193,10 +2193,10 @@ void CWriter::printFunctionSignature(const Function *F, bool Prototype) {
   if (F->hasDLLExportLinkage()) Out << "__declspec(dllexport) ";  
   switch (F->getCallingConv()) {
    case CallingConv::X86_StdCall:
-    Out << "__stdcall ";
+    Out << "__attribute__((stdcall)) ";
     break;
    case CallingConv::X86_FastCall:
-    Out << "__fastcall ";
+    Out << "__attribute__((fastcall)) ";
     break;
   }