mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-27 20:36:05 +00:00

Introduce a new "export_as" directive for top-level modules, which indicates that the current module is a "private" module whose symbols will eventually be exported through the named "public" module. This is in support of a common pattern in the Darwin ecosystem where a single public framework is constructed of several private frameworks, with (currently) header duplication and some support from the linker. Addresses rdar://problem/34438420. llvm-svn: 313316
10 lines
484 B
C
10 lines
484 B
C
// RUN: rm -rf %t
|
|
// RUN: not %clang_cc1 -fmodules -fmodules-cache-path=%t -fmodule-map-file=%S/Inputs/export_as_test.modulemap %s 2> %t.err
|
|
// RUN: FileCheck %s < %t.err
|
|
|
|
// CHECK: export_as_test.modulemap:3:13: error: conflicting re-export of module 'PrivateFoo' as 'Foo' or 'Bar'
|
|
// CHECK: export_as_test.modulemap:4:13: warning: module 'PrivateFoo' already re-exported as 'Bar'
|
|
// CHECK: export_as_test.modulemap:7:15: error: only top-level modules can be re-exported as public
|
|
|
|
|