This question is probably a better fit for the cfe-users / dev mailing list
since it is about the clang frontend.
-- adrian> On Jul 16, 2017, at 6:28 AM, Mathieu Garaud via llvm-dev <llvm-dev at
lists.llvm.org> wrote:
>
> Hi,
>
> I put together a small test but it doesn't work and I didn't find
much documentation so maybe someone can help?
>
> 1. std.cppm
> export module std;
> #include <cstdint>
>
> 2. cmd.cppm
> export module cmd;
> import std;
> namespace cmd {
> export enum struct value_type : std::uint8_t {
> INT = 0
> };
> };
>
> but the compilation of cmd module fails:
> /usr/local/opt/llvm/bin/clang -x c++-module -Og -g
-fno-omit-frame-pointer -std=c++1z -fmodules-ts -nostdinc++ -isystem
/usr/local/opt/llvm
> /include/c++/v1 -Weverything -Wno-c++98-compat -Wno-c++98-compat-pedantic
-Wno-c++11-compat -Wno-c++11-compat-pedantic -Wno-padded
-Wno-documentation-unknown-command -Wno-documentation --precompile
-fmodule-file=std.pcm -o cmd.pcm cmd.cppm
> cmd.cppm:8:37: error: use of undeclared identifier 'std'
> export enum struct value_type : std::uint8_t
>
> Any ideas why? Any suggestions to make it work?
>
> PS: clang version
> clang version 5.0.0 (https://llvm.org/git/clang.git
<https://llvm.org/git/clang.git> 2004a0d58e49a79917f4fe861462f3dd59d42009)
(https://llvm.org/git/llvm.git <https://llvm.org/git/llvm.git>
a4a73ad242dce894dbb05b9871d5ba133149f0d4)
> Target: x86_64-apple-darwin16.6.0
> Thread model: posix
> InstalledDir: /usr/local/opt/llvm/bin
>
> Thanks,
>
> Mathieu
>
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20170717/99aaa242/attachment.html>