[llvm] r198938 - Use 'w' instead of 'c' to represent the win32 mangling.

Rafael Espindola rafael.espindola at gmail.com
Fri Jan 10 05:42:12 PST 2014


Author: rafael
Date: Fri Jan 10 07:42:12 2014
New Revision: 198938

URL: http://llvm.org/viewvc/llvm-project?rev=198938&view=rev
Log:
Use 'w' instead of 'c' to represent the win32 mangling.

This change was requested to avoid confusion if we ever support non windows coff
systems.

Modified:
    llvm/trunk/docs/LangRef.rst
    llvm/trunk/include/llvm/IR/DataLayout.h
    llvm/trunk/lib/IR/DataLayout.cpp

Modified: llvm/trunk/docs/LangRef.rst
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/LangRef.rst?rev=198938&r1=198937&r2=198938&view=diff
==============================================================================
--- llvm/trunk/docs/LangRef.rst (original)
+++ llvm/trunk/docs/LangRef.rst Fri Jan 10 07:42:12 2014
@@ -1165,7 +1165,7 @@ as follows:
    * ``m``: Mips mangling: Private symbols get a ``$`` prefix.
    * ``o``: Mach-O mangling: Private symbols get ``L`` prefix. Other
     symbols get a ``_`` prefix.
-   * ``c``:  COFF prefix:  Similar to Mach-O, but stdcall and fastcall
+   * ``w``: Windows COFF prefix:  Similar to Mach-O, but stdcall and fastcall
   functions also get a suffix based on the frame size.
 ``n<size1>:<size2>:<size3>...``
     This specifies a set of native integer widths for the target CPU in

Modified: llvm/trunk/include/llvm/IR/DataLayout.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/DataLayout.h?rev=198938&r1=198937&r2=198938&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/DataLayout.h (original)
+++ llvm/trunk/include/llvm/IR/DataLayout.h Fri Jan 10 07:42:12 2014
@@ -104,7 +104,7 @@ private:
     MM_None,
     MM_ELF,
     MM_MachO,
-    MM_COFF,
+    MM_WINCOFF,
     MM_Mips
   };
   ManglingModeT ManglingMode;
@@ -234,7 +234,7 @@ public:
   }
 
   bool hasMicrosoftFastStdCallMangling() const {
-    return ManglingMode == MM_COFF;
+    return ManglingMode == MM_WINCOFF;
   }
 
   bool hasLinkerPrivateGlobalPrefix() const {
@@ -254,7 +254,7 @@ public:
     case MM_Mips:
       return '\0';
     case MM_MachO:
-    case MM_COFF:
+    case MM_WINCOFF:
       return '_';
     }
     llvm_unreachable("invalid mangling mode");
@@ -269,7 +269,7 @@ public:
     case MM_Mips:
       return "$";
     case MM_MachO:
-    case MM_COFF:
+    case MM_WINCOFF:
       return "L";
     }
     llvm_unreachable("invalid mangling mode");

Modified: llvm/trunk/lib/IR/DataLayout.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/DataLayout.cpp?rev=198938&r1=198937&r2=198938&view=diff
==============================================================================
--- llvm/trunk/lib/IR/DataLayout.cpp (original)
+++ llvm/trunk/lib/IR/DataLayout.cpp Fri Jan 10 07:42:12 2014
@@ -159,7 +159,7 @@ const char *DataLayout::getManglingCompo
   if (T.isOSBinFormatELF() || T.isArch64Bit())
     return "-m:e";
   assert(T.isOSBinFormatCOFF());
-  return "-m:c";
+  return "-m:w";
 }
 
 static const LayoutAlignElem DefaultAlignments[] = {
@@ -334,8 +334,8 @@ void DataLayout::parseSpecifier(StringRe
       case 'm':
         ManglingMode = MM_Mips;
         break;
-      case 'c':
-        ManglingMode = MM_COFF;
+      case 'w':
+        ManglingMode = MM_WINCOFF;
         break;
       }
       break;
@@ -525,8 +525,8 @@ std::string DataLayout::getStringReprese
   case MM_MachO:
     OS << "-m:o";
     break;
-  case MM_COFF:
-    OS << "-m:c";
+  case MM_WINCOFF:
+    OS << "-m:w";
     break;
   case MM_Mips:
     OS << "-m:m";





More information about the llvm-commits mailing list