brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · f045ec4 Raw
40 lines · plain
1// UNSUPPORTED: target={{.*}}-zos{{.*}}, target={{.*}}-aix{{.*}}2// RUN: rm -rf %t3// RUN: mkdir %t4// 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=RecordDef6// 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=RecordDef8 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_TEXTUAL12  #import <RecordDefIncluder/RecordDefIncluder.h>13#else14  #import <RecordDef/RecordDef.h>15#endif16 17void 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_TEXTUAL27  #import <RecordDef/RecordDef.h>28#else29  #import <RecordDefIncluder/RecordDefIncluder.h>30#endif31 32void mbap(void) {33  Buffer buf;34  buf.c = 2;35  AnonymousStruct strct;36  strct.y = 2;37  UnionRecord rec;38  rec.v = 2;39}40