[llvm-bugs] [Bug 34163] New: using 'class name' causes vtable to not be emitted when compiling with -g

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Aug 11 12:54:02 PDT 2017


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

            Bug ID: 34163
           Summary: using 'class name' causes vtable to not be emitted
                    when compiling with -g
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: jmuizelaar at mozilla.com
                CC: dgregor at apple.com, llvm-bugs at lists.llvm.org

The following code does not get a vtable emitted when compiling with clang
5.0.0 (release_50 at 310398). Removing the 'using mozilla::B' line causes it to be
emitted. The vtable is also emitted when not using '-g' 

class FontInfoData;

class A {
          void F(FontInfoData *aFontInfoData);
};

namespace mozilla {
        struct B
        {
                A* mAttrs;
        };
}

using mozilla::B;

using namespace mozilla;
class FontInfoData {
        void Release() {
                delete this;
        }
        virtual ~FontInfoData() {}
        virtual void R();
};

void FontInfoData::R() {
}

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170811/a3cf70d1/attachment.html>


More information about the llvm-bugs mailing list