<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Cannot mangle injected class name type."
   href="https://bugs.llvm.org/show_bug.cgi?id=35473">35473</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Cannot mangle injected class name type.
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Modules
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>warvstar@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>dgregor@apple.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=19490" name="attach_19490" title="The error only happens when certain functions are called, such as PxSceneDesc sceneDesc(m);">attachment 19490</a> <a href="attachment.cgi?id=19490&action=edit" title="The error only happens when certain functions are called, such as PxSceneDesc sceneDesc(m);">[details]</a></span>
The error only happens when certain functions are called, such as PxSceneDesc
sceneDesc(m);

I get the following error when trying to compile a cpp module interface.

Physics.cppm ( has includes for the PhysX library )
Physics.cpp ( crashes here when compiling for Windows, Android compiles fine. )

The error I get is 
Cannot mangle injected class name type.
1>UNREACHABLE executed at
C:\src\llvm_package_318667\llvm\tools\clang\lib\AST\MicrosoftMangle.cpp:2469!
1>Wrote crash dump file
"C:\Users\JARSTU~1\AppData\Local\Temp\clang++.exe-51e3dd.dmp"
1>0x021758F8 (0x00000016 0x04FD3674 0x04FD3674 0x00000003)
1>0x77655422 (0x04FD3680 0x0B39C190 0x0B39C198 0x0B39C190), abort() + 0x32
bytes(s)

These are the arguments I pass to clang
clang++.exe  -Xclang --dependent-lib=msvcrtd -Xclang --dependent-lib=oldnames
-Wno-c++11-narrowing -fno-ms-compatibility -Wno-unused-command-line-argument
-Wno-pragma-pack -Wno-nonportable-include-path -fno-delayed-template-parsing
-g2 -c ..\Shared\..\Project5\Physics.cpp -o ./x64/Debug/\Physics.cpp.o
-DUNICODE -D_UNICODE -D_CONSOLE -DUSINGMODULES -DWIN32 -D_DEBUG -D_MT -D_DLL
-DVC_EXTRALEAN -DWIN32_LEAN_AND_MEAN -DGLEW_STATIC -D_HAS_EXCEPTIONS=0
-fmodules-ts -IC:\glm\glm -IE:\physx\PhysX-3.4\PhysX_3.4\Source\Common\src -m64
--target=x86_64-windows-msvc -gcodeview -std=c++17 -O0 -emit-llvm -save-temps
-fprebuilt-module-path=./x64/Debug/ -fmodule-file=./x64/Debug/Physics.pcm

I've attached the ii file, not sure how helpful that would be.

If there is any way I can be of help, let me know. Thanks
Robert</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>