<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 - dllexported classes don't emit typeinfo (often enough) in the itanium ABI"
   href="https://bugs.llvm.org/show_bug.cgi?id=35146">35146</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>dllexported classes don't emit typeinfo (often enough) in the itanium ABI
          </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>All
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>C++
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>martin@martin.st
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>dgregor@apple.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>With both GCC (tested with GCC 5.3) and MSVC, and clang in MSVC mode, a
dllexported class declaration trigger emitting typeinfo (and the corresponding
export linker directives), while clang in itanium mode fails to do this.

This causes build failures when building Qt for MinGW with clang (unless RTTI
is disabled, which isn't officially supported in Qt).

Example case:

dllexport-rtti.cpp:
    class __declspec(dllexport) VirtualClass {
    public:
        void virtual bar();
    };

$ x86_64-w64-mingw32-g++ -c dllexport-rtti.cpp -o dllexport-rtti.o
$ llvm-nm dllexport-rtti.o
00000000 R _ZTI12VirtualClass
00000000 R _ZTS12VirtualClass
         U _ZTVN10__cxxabiv117__class_type_infoE
$ llvm-readobj -coff-directives dllexport-rtti.o

File: dllexport-rtti.o
Format: COFF-x86-64
Arch: x86_64
AddressSize: 64bit
Directive(s):  -export:"_ZTI12VirtualClass",data

With clang (clang -target x86_64-windows-gnu dllexport-rtti.cpp -c -o
dllexport-rtti.o), nothing gets emitted in this build.

This seems to be related to things that David Majnemer touched in SVN r244266
in this commit:
"[ItaniumCXXABI] Don't import RTTI data for classes with key functions"
(This particular test case behaves identically both before and after that
commit though, but it seems to be related.)</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>