brintos

brintos / llvm-project-archived public Read only

0
0
Text · 657 B · da26a00 Raw
34 lines · cpp
1// RUN: rm -rf %t2// RUN: mkdir -p %t3// RUN: split-file %s %t4// RUN: cd %t5// RUN: %clang_cc1 -iquote . -fmodules -fno-cxx-modules -emit-module \6// RUN:   -std=c++20 -fmodule-name=c -xc++ c.cppmap -o c.pcm7// RUN: %clang_cc1 -iquote . -fmodules -fno-cxx-modules -emit-module \8// RUN:   -std=c++20 -fmodule-name=a -fmodule-map-file=a.cppmap \9// RUN:   -fmodule-file=c.pcm -xc++ a.cppmap -o a.pcm10 11//--- a.cppmap12module "a" {13 header "a.h"14}15//--- a.h16#include "b.h"17//--- b.h18#ifndef _B_H_19#define _B_H_20struct B {21  consteval B() {}22  union {23    int a;24  };25};26constexpr B b;27#endif28//--- c.cppmap29module "c" {30header "c.h"31}32//--- c.h33#include "b.h"34