http://llvm.org/bugs/show_bug.cgi?id=21073

            Bug ID: 21073
           Summary: MS ABI: Derived class has fewer vftable entries than
                    base
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

consider:
struct __declspec(dllexport) A {
  virtual A *f();
};
struct __declspec(dllexport) B : virtual A {
  virtual B *f();
};
struct __declspec(dllexport) C : virtual A, virtual B {};

--- different.cpp_clang.obj.dump        2014-09-25 13:24:59.240925700 -0700
+++ different.cpp_vs.obj.dump   2014-09-25 13:24:59.286925700 -0700
@@ -1,7 +1,8 @@
 const A::`vftable'[0]: public: virtual struct A * __thiscall A::f(void)
 const B::`vftable'[0]: public: struct A * __thiscall B::f(void)
 const B::`vftable'[4]: public: virtual struct B * __thiscall B::f(void)
-const C::`vftable'[0]: [thunk]:public: virtual struct A * __thiscall
B::f`adjustor{4294967288}' (void)
+const C::`vftable'[0]: [thunk]:public: virtual struct B * __thiscall
B::f`adjustor{4294967288}' (void)
+const C::`vftable'[4]: [thunk]:public: virtual struct B * __thiscall
B::f`adjustor{4294967288}' (void)
 const B::`vbtable'[0]: 0
 const B::`vbtable'[4]: 4
 const C::`vbtable'{for `C'}[0]: 0

We don't give C fewer vftable slots than B.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to