https://bugs.llvm.org/show_bug.cgi?id=37993

            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: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected]

foo.cppm:
  export module foo;
  export struct use {};

use.cpp:
  import foo;
  void use(foo *f) {}

$ clang++ -fmodules-ts -c -std=c++17 -Xclang -fmodules-codegen --precompile
foo.cppm
$ 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 ""
  <<<INVALID BUFFER>>
  #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.
_______________________________________________
llvm-bugs mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to