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

            Bug ID: 23549
           Summary: [MS ABI] Clang doesn't generate local vftables with
                    dllimport
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified

consider:
struct _declspec(dllimport) A {
  A()
  virtual ~A();
};

A *f() { return new A();}

MSVC generates:
This calls 'operator new' and the imported A constructor.  However, it also
overwrites the VFPtr with a so-called "local vftable". I suspect this is to
support overriding the global operator new and delete.

More information is available here:
https://groups.google.com/d/msg/microsoft.public.vc.language/atSh_2VSc2w/EgJ3r_7OzVUJ

-- 
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