brintos

brintos / llvm-project-archived public Read only

0
0
Text · 975 B · 0028ab0 Raw
38 lines · cpp
1// RUN: rm -rf %t2// RUN: %clang_cc1 -triple %itanium_abi_triple -fmodules -fmodules-cache-path=%t %s -emit-llvm -o - | FileCheck %s3// RUN: %clang_cc1 -triple %itanium_abi_triple -fmodules -fmodules-cache-path=%t %s -emit-llvm -o - -fexperimental-new-constant-interpreter | FileCheck %s4 5// CHECK: @{{.*var.*}} = {{.*}} %union.union_type { i8 1 },6 7#pragma clang module build bar8module bar {9  header "bar.h" { size 40 mtime 0 }10  export *11}12#pragma clang module contents13#pragma clang module begin bar14union union_type {15  char h{1};16};17#pragma clang module end18#pragma clang module endbuild19#pragma clang module build foo20module foo {21  header "foo.h" { size 97 mtime 0 }22  export *23}24#pragma clang module contents25#pragma clang module begin foo26union union_type {27  char h{1};28};29#pragma clang module import bar30template<typename T>31union_type var;32#pragma clang module end33#pragma clang module endbuild34#pragma clang module import foo35int main() {36  (void)&var<int>;37}38