File: mangling_real_real.d

package info (click to toggle)
ldc 1%3A1.30.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 59,248 kB
  • sloc: cpp: 61,598; ansic: 14,545; sh: 1,014; makefile: 972; asm: 510; objc: 135; exp: 48; python: 12
file content (23 lines) | stat: -rw-r--r-- 913 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
// Tests that repeated `real` return types are treated as built-in types in C++ mangling (no substitution).

// REQUIRES: target_X86

// RUN: %ldc -mtriple=x86_64-linux   -c -output-ll -of=%t.ll         %s && FileCheck %s --check-prefix=LINUX   < %t.ll
// RUN: %ldc -mtriple=x86_64-android -c -output-ll -of=%t.android.ll %s && FileCheck %s --check-prefix=ANDROID < %t.android.ll
// RUN: %ldc -mtriple=x86_64-windows -c -output-ll -of=%t.windows.ll %s && FileCheck %s --check-prefix=WINDOWS < %t.windows.ll

import core.stdc.config;

// LINUX: define {{.*}}Z8withrealee
// ANDROID: define {{.*}}Z8withrealgg
// WINDOWS: define {{.*}}?withreal@@YAXOO@Z
extern (C++) void withreal(real a, real b)
{
}

// LINUX: define {{.*}}Z15withclongdoubleee
// ANDROID: define {{.*}}Z15withclongdoublegg
// WINDOWS: define {{.*}}?withclongdouble@@YAXOO@Z
extern (C++) void withclongdouble(c_long_double a, c_long_double b)
{
}