<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 - Windows debug symbols don't show vtcast information"
   href="https://bugs.llvm.org/show_bug.cgi?id=38944">38944</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Windows debug symbols don't show vtcast information
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </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>enhancement
          </td>
        </tr>

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

        <tr>
          <th>Component</th>
          <td>new bugs
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>dmajor@mozilla.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org, rnk@google.com, zturner@google.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>struct MyInterface
{
   virtual int F() = 0;
};

struct MyClass1 : public MyInterface
{
  int F() { return 1; }
} g_myClass1;

struct MyClass2 : public MyInterface
{
  int F() { return 2; }
} g_myClass2;

int main(int argc, char* argv[])
{
  MyInterface* volatile ptr;
  ptr = &g_myClass1;
  if (argc) ptr = &g_myClass2;
  __debugbreak();
  int result = ptr->F();
  return result;
}

clang-cl -c -GR- -Z7 x.cpp
lld-link -debug -nodefaultlib -entry:main x.obj
windbg -g x.exe

At the breakpoint, open the Locals window (Alt+3).

With cl.exe + link.exe, you can expand the `ptr` node and see a vtcast option:

- ptr                   0x00007ff7`13ffff10 struct MyInterface *
  + __vtcast_MyClass2   struct MyClass2
  + __vfptr             0x00007ff7`13fec050 x!MyClass2::`vftable' = Array [1]

With clang-cl + lld-link, `ptr` isn't even expandable:

  ptr                   0x00007ff7`c8b73008 struct MyInterface *

Reduced from <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=1490743">https://bugzilla.mozilla.org/show_bug.cgi?id=1490743</a></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>