Files
swift-mirror/test/Interop/Cxx/namespace/Inputs/module.modulemap
zoecarver bd96959d14 [cxx-interop] Re-implement namespaces using enums + extensions.
C++ namespaces are module-independent, but enums are owned by their module's in Swift. So, to prevent declaring two enums with the same name, this patch implements a new approach to namespaces: enums with extensions.

Here's an example:
```
// Module A
namespace N { void test1(); }
// Module B
namespace N { void test2(); }
// __ObjC module
enum N { }
// Swift module A
extension N { func test1() }
// Swift module B
extension N { func test1() }
```

Thanks to @gribozavr for the great idea.
2021-02-14 16:54:24 -08:00

29 lines
577 B
Plaintext

module Classes {
header "classes.h"
}
module ClassesSecondHeader {
// TODO: we shouldn't have to include both of these, and the decls defined in
// these headers should be added to the correct module: SR-14214.
header "classes.h"
header "classes-second-header.h"
}
module FreeFunctions {
header "free-functions.h"
}
module FreeFunctionsSecondHeader {
header "free-functions.h"
header "free-functions-second-header.h"
}
module Templates {
header "templates.h"
}
module TemplatesSecondHeader {
header "templates.h"
header "templates-second-header.h"
}