[llvm-bugs] [Bug 37993] New: [Modules TS] Support -frewrite-imports with C++ modules TS-style modules

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Jun 29 11:53:04 PDT 2018


            Bug ID: 37993
           Summary: [Modules TS] Support -frewrite-imports with C++
                    modules TS-style modules
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Modules
          Assignee: unassignedclangbugs at nondot.org
          Reporter: dblaikie at gmail.com
                CC: dgregor at apple.com, llvm-bugs at lists.llvm.org,
                    richard-llvm at metafoo.co.uk

  export module foo;
  export struct use {};

  import foo;
  void use(foo *f) {}

$ clang++ -fmodules-ts -c -std=c++17 -Xclang -fmodules-codegen --precompile
$ clang++ -fmodules-ts -c -std=c++17 -fmodule-file=foo.pcm use.cpp
-frewrite-imports -E
  #pragma clang module build foo
  # 1 "<built-in>"
  # 1 ""
  #pragma clang module endbuild /*foo*/
  # 1 "<built-in>"
  # 1 "use.cpp"
  import foo;
  void use(foo *f) {}

Richard mentioned that we'd probably need an extra flag in the `#pragma clang
module build` that specifies whether what follows is a module map or a TS
module interface definition.

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180629/93d0102b/attachment.html>

More information about the llvm-bugs mailing list