[pkg-d-commits] [ldc] 43/95: Fix gen/ldctraits D/C++ interop ABI regression

Matthias Klumpp mak at moszumanska.debian.org
Thu Jul 13 20:53:59 UTC 2017


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

mak pushed a commit to annotated tag v1.3.0-beta1
in repository ldc.

commit 8db147a03600a7c976d2cc021f4f5f88c4780f65
Author: Martin <noone at nowhere.com>
Date:   Sun Mar 5 19:28:54 2017 +0100

    Fix gen/ldctraits D/C++ interop ABI regression
    
    A ctor (I think I added it for convenience when merging 2.073) means that
    it's no POD type for C++ anymore. Non-POD structs are expected to be
    returned via sret etc.
    
    Fixes lit-test semantic/target_traits.d for x86 hosts.
---
 gen/ldctraits.h | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/gen/ldctraits.h b/gen/ldctraits.h
index 3bbee6e..41e1905 100644
--- a/gen/ldctraits.h
+++ b/gen/ldctraits.h
@@ -12,17 +12,15 @@
 
 struct Dstring
 {
-    size_t length = 0;
-    const char *ptr = nullptr;
-
-    Dstring(size_t length, const char *ptr) : length(length), ptr(ptr) {}
+    size_t length;
+    const char *ptr;
 };
 
 Dstring traitsGetTargetCPU();
 bool traitsTargetHasFeature(Dstring feature);
 
 template <int N> bool traitsTargetHasFeature(const char (&feature)[N]) {
-  return traitsTargetHasFeature(Dstring(N - 1, feature));
+  return traitsTargetHasFeature({N - 1, feature});
 }
 
 #endif

-- 
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