brintos

brintos / llvm-project-archived public Read only

0
0
Text · 840 B · 3a2eeab Raw
32 lines · plain
1// RUN: rm -rf %t2// RUN: split-file %s %t3// RUN: cd %t4//5// RUN: %clang_cc1 -std=c++20 -triple %itanium_abi_triple %t/a.cppm -emit-reduced-module-interface -o %t/a.pcm6// RUN: %clang_cc1 -std=c++20 -triple %itanium_abi_triple %t/use.cc -fmodule-file=a=%t/a.pcm -fsyntax-only -verify7// RUN: %clang_cc1 -std=c++20 -triple %itanium_abi_triple %t/use.cc -fmodule-file=a=%t/a.pcm -emit-llvm -o - | \8// RUN:     FileCheck %t/use.cc9 10//--- a.cppm11export module a;12namespace {13struct Local {};14}15 16export class A { 17public:18    void *external_but_not_type_external(Local *) {19        return nullptr;20    }21};22 23//--- use.cc24// expected-no-diagnostics25import a;26void *use() {27    A a;28    return a.external_but_not_type_external(nullptr);29}30 31// CHECK: define {{.*}}internal {{.*}}@_ZNW1a1A30external_but_not_type_externalEPN12_GLOBAL__N_15LocalE32