<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </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 --- - DW_AT_containing_type on a DW_TAG_class_type"
   href="http://llvm.org/bugs/show_bug.cgi?id=21902">21902</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>DW_AT_containing_type on a DW_TAG_class_type
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>libraries
          </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>Common Code Generator Code
          </td>
        </tr>

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

        <tr>
          <th>Reporter</th>
          <td>paul_robinson@playstation.sony.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>DW_AT_containing_type is specified only for DW_TAG_ptr_to_member_type,
but it can appear on DW_TAG_class_type.  More curiously, the attribute is a
self-reference to the class type DIE.

Older Clangs (through 3.3) did this for Linux, but 3.5 and trunk only do it
for FreeBSD, not Linux.  Possibly an ABI dependent thing?  But the attribute
doesn't belong there, regardless.  (Curiously, my 3.4 doesn't produce it for
either Linux or FreeBSD.)

$ cat test.cpp
class X {
public:
  virtual ~X();
} x;

$ clang -c -g -target x86_64-unknown-freebsd9 test.cpp
$ llvm-dwarfdump -debug-dump=info test.o
....
0x00000040:   DW_TAG_class_type [3] *
                DW_AT_containing_type [DW_FORM_ref4]    (cu + 0x0040 =>
{0x00000040})</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>