[llvm-dev] [Module TS] Help

Mathieu Garaud via llvm-dev llvm-dev at lists.llvm.org
Sun Jul 16 06:28:12 PDT 2017


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
2004a0d58e49a79917f4fe861462f3dd59d42009) (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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170716/fae06f26/attachment.html>


More information about the llvm-dev mailing list