[pkg-d-commits] [ldc] 95/149: Fix extern(C++) naked functions mangling for Win32

Matthias Klumpp mak at moszumanska.debian.org
Sun Apr 23 22:37:02 UTC 2017


This is an automated email from the git hooks/post-receive script.

mak pushed a commit to annotated tag v1.2.0
in repository ldc.

commit f5bc81e93b2d7039a57d620c6394969e1748bb22
Author: Martin <noone at nowhere.com>
Date:   Tue Feb 7 20:52:37 2017 +0100

    Fix extern(C++) naked functions mangling for Win32
---
 gen/naked.cpp | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/gen/naked.cpp b/gen/naked.cpp
index 1d6ccfc..f66f406 100644
--- a/gen/naked.cpp
+++ b/gen/naked.cpp
@@ -184,13 +184,13 @@ void DtoDefineNakedFunction(FuncDeclaration *fd) {
   }
   // Windows is different
   else if (isWin) {
-    // prepend extra underscore for Win32
-    if (triple.isArch32Bit()) {
+    // prepend extra underscore for Win32 (except for extern(C++))
+    if (triple.isArch32Bit() && fd->linkage != LINKcpp) {
       fullmangle += '_';
       fullmangle += mangle;
       mangle = fullmangle.c_str();
     }
-    // leading ? apparently needs quoting, at least for Win64
+    // leading ? apparently needs quoting
     else if (mangle[0] == '?') {
       fullmangle += '"';
       fullmangle += mangle;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-d/ldc.git



More information about the pkg-d-commits mailing list