File: pragma_no_typeinfo.d

package info (click to toggle)
ldc 1%3A1.24.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 53,728 kB
  • sloc: cpp: 55,939; ansic: 10,599; sh: 958; makefile: 801; asm: 507; objc: 122; exp: 30; python: 12
file content (27 lines) | stat: -rw-r--r-- 947 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// Make sure the LDC_no_typeinfo pragma prevents TypeInfo emission.

// RUN: %ldc -output-ll -of=%t.ll %s && FileCheck %s < %t.ll

pragma(LDC_no_moduleinfo); // prevent ModuleInfo from referencing class TypeInfos


// CHECK: _D50TypeInfo_S18pragma_no_typeinfo18StructWithTypeInfo6__initZ = linkonce_odr global %object.TypeInfo_Struct
struct StructWithTypeInfo {}

// CHECK: _D18pragma_no_typeinfo17ClassWithTypeInfo7__ClassZ = global %object.TypeInfo_Class
class ClassWithTypeInfo {}

// CHECK: _D18pragma_no_typeinfo21InterfaceWithTypeInfo11__InterfaceZ = global %object.TypeInfo_Class
interface InterfaceWithTypeInfo {}


pragma(LDC_no_typeinfo):

// CHECK-NOT: _D48TypeInfo_S18pragma_no_typeinfo16StructNoTypeInfo6__initZ
struct StructNoTypeInfo {}

// CHECK-NOT: _D18pragma_no_typeinfo15ClassNoTypeInfo7__ClassZ
class ClassNoTypeInfo {}

// CHECK-NOT: _D18pragma_no_typeinfo19InterfaceNoTypeInfo11__InterfaceZ
interface InterfaceNoTypeInfo {}