Debian Codegraph @

clang/test/Modules/merge-record-definition-nonmodular.m

raw
1 // UNSUPPORTED: target={{.*}}-zos{{.*}}, target={{.*}}-aix{{.*}}
2 // RUN: rm -rf %t
3 // RUN: mkdir %t
4 // RUN: %clang_cc1 -emit-llvm -o %t/test.bc -F%S/Inputs/merge-record-definition %s \
5 // RUN: -fmodules -fimplicit-module-maps -fmodules-cache-path=%t/modules.cache -fmodule-name=RecordDef
6 // RUN: %clang_cc1 -emit-llvm -o %t/test.bc -F%S/Inputs/merge-record-definition %s -DMODULAR_BEFORE_TEXTUAL \
7 // RUN: -fmodules -fimplicit-module-maps -fmodules-cache-path=%t/modules.cache -fmodule-name=RecordDef
8
9 // Test a case when a struct definition once is included from a textual header and once from a module.
10
11 #ifdef MODULAR_BEFORE_TEXTUAL
12 #import <RecordDefIncluder/RecordDefIncluder.h>
13 #else
14 #import <RecordDef/RecordDef.h>
15 #endif
16
17 void bibi(void) {
18 Buffer buf;
19 buf.b = 1;
20 AnonymousStruct strct;
21 strct.x = 1;
22 UnionRecord rec;
23 rec.u = 1;
24 }
25
26 #ifdef MODULAR_BEFORE_TEXTUAL
27 #import <RecordDef/RecordDef.h>
28 #else
29 #import <RecordDefIncluder/RecordDefIncluder.h>
30 #endif
31
32 void mbap(void) {
33 Buffer buf;
34 buf.c = 2;
35 AnonymousStruct strct;
36 strct.y = 2;
37 UnionRecord rec;
38 rec.v = 2;
39 }