<div dir="ltr">I moved this test to microsoft-abi-vtables-single-inheritance.cpp in r218966.</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 3, 2014 at 12:58 AM, David Majnemer <span dir="ltr"><<a href="mailto:david.majnemer@gmail.com" target="_blank">david.majnemer@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Done in r218964.</div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 1, 2014 at 6:07 AM, Timur Iskhodzhanov <span dir="ltr"><<a href="mailto:timurrrr@google.com" target="_blank">timurrrr@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">There's also no test that verifies we put "_purecall" into the vftable, right?<br>
<div><div><br>
2014-09-26 21:52 GMT+04:00 David Majnemer <<a href="mailto:david.majnemer@gmail.com" target="_blank">david.majnemer@gmail.com</a>>:<br>
> We could replace it with an out of line constructor.<br>
><br>
> On Fri, Sep 26, 2014 at 2:36 AM, Timur Iskhodzhanov <<a href="mailto:timurrrr@google.com" target="_blank">timurrrr@google.com</a>><br>
> wrote:<br>
>><br>
>> __declspec(dllexport) isn't needed, is it?<br>
>><br>
>> 2014-09-12 8:38 GMT+04:00 David Majnemer <<a href="mailto:david.majnemer@gmail.com" target="_blank">david.majnemer@gmail.com</a>>:<br>
>> > Author: majnemer<br>
>> > Date: Thu Sep 11 23:38:08 2014<br>
>> > New Revision: 217654<br>
>> ><br>
>> > URL: <a href="http://llvm.org/viewvc/llvm-project?rev=217654&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=217654&view=rev</a><br>
>> > Log:<br>
>> > MS ABI: The latest VC "14" CTP implements deleted virtual functions<br>
>> ><br>
>> > Deleted virtual functions get _purecall inserted into the vftable.<br>
>> > Earlier CTPs would simply stick nullptr in there.<br>
>> ><br>
>> > N.B. MSVC can't handle deleted virtual functions which require return<br>
>> > adjusting thunks, they give an error that a deleted function couldn't be<br>
>> > called inside of a compiler generated function. We get this correct by<br>
>> > making the thunk have a __purecall entry as well.<br>
>> ><br>
>> > Modified:<br>
>> > cfe/trunk/lib/AST/VTableBuilder.cpp<br>
>> > cfe/trunk/lib/CodeGen/MicrosoftCXXABI.cpp<br>
>> ><br>
>> > cfe/trunk/test/CodeGenCXX/microsoft-abi-vtables-virtual-inheritance.cpp<br>
>> ><br>
>> > Modified: cfe/trunk/lib/AST/VTableBuilder.cpp<br>
>> > URL:<br>
>> > <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/VTableBuilder.cpp?rev=217654&r1=217653&r2=217654&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/VTableBuilder.cpp?rev=217654&r1=217653&r2=217654&view=diff</a><br>
>> ><br>
>> > ==============================================================================<br>
>> > --- cfe/trunk/lib/AST/VTableBuilder.cpp (original)<br>
>> > +++ cfe/trunk/lib/AST/VTableBuilder.cpp Thu Sep 11 23:38:08 2014<br>
>> > @@ -2566,13 +2566,6 @@ private:<br>
>> > }<br>
>> > }<br>
>> ><br>
>> > - void ErrorUnsupported(StringRef Feature, SourceLocation Location) {<br>
>> > - clang::DiagnosticsEngine &Diags = Context.getDiagnostics();<br>
>> > - unsigned DiagID = Diags.getCustomDiagID(<br>
>> > - DiagnosticsEngine::Error, "v-table layout for %0 is not<br>
>> > supported yet");<br>
>> > - Diags.Report(Context.getFullLoc(Location), DiagID) << Feature;<br>
>> > - }<br>
>> > -<br>
>> > public:<br>
>> > VFTableBuilder(MicrosoftVTableContext &VTables,<br>
>> > const CXXRecordDecl *MostDerivedClass, const VPtrInfo<br>
>> > *Which)<br>
>> > @@ -3037,10 +3030,8 @@ void VFTableBuilder::dumpLayout(raw_ostr<br>
>> > if (MD->isPure())<br>
>> > Out << " [pure]";<br>
>> ><br>
>> > - if (MD->isDeleted()) {<br>
>> > - ErrorUnsupported("deleted methods", MD->getLocation());<br>
>> > + if (MD->isDeleted())<br>
>> > Out << " [deleted]";<br>
>> > - }<br>
>> ><br>
>> > ThunkInfo Thunk = VTableThunks.lookup(I);<br>
>> > if (!Thunk.isEmpty())<br>
>> ><br>
>> > Modified: cfe/trunk/lib/CodeGen/MicrosoftCXXABI.cpp<br>
>> > URL:<br>
>> > <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/MicrosoftCXXABI.cpp?rev=217654&r1=217653&r2=217654&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/MicrosoftCXXABI.cpp?rev=217654&r1=217653&r2=217654&view=diff</a><br>
>> ><br>
>> > ==============================================================================<br>
>> > --- cfe/trunk/lib/CodeGen/MicrosoftCXXABI.cpp (original)<br>
>> > +++ cfe/trunk/lib/CodeGen/MicrosoftCXXABI.cpp Thu Sep 11 23:38:08 2014<br>
>> > @@ -63,8 +63,6 @@ public:<br>
>> > }<br>
>> ><br>
>> > StringRef GetPureVirtualCallName() override { return "_purecall"; }<br>
>> > - // No known support for deleted functions in MSVC yet, so this choice<br>
>> > is<br>
>> > - // arbitrary.<br>
>> > StringRef GetDeletedVirtualCallName() override { return "_purecall";<br>
>> > }<br>
>> ><br>
>> > llvm::Value *adjustToCompleteObject(CodeGenFunction &CGF,<br>
>> ><br>
>> > Modified:<br>
>> > cfe/trunk/test/CodeGenCXX/microsoft-abi-vtables-virtual-inheritance.cpp<br>
>> > URL:<br>
>> > <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/microsoft-abi-vtables-virtual-inheritance.cpp?rev=217654&r1=217653&r2=217654&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/microsoft-abi-vtables-virtual-inheritance.cpp?rev=217654&r1=217653&r2=217654&view=diff</a><br>
>> ><br>
>> > ==============================================================================<br>
>> > ---<br>
>> > cfe/trunk/test/CodeGenCXX/microsoft-abi-vtables-virtual-inheritance.cpp<br>
>> > (original)<br>
>> > +++<br>
>> > cfe/trunk/test/CodeGenCXX/microsoft-abi-vtables-virtual-inheritance.cpp Thu<br>
>> > Sep 11 23:38:08 2014<br>
>> > @@ -1,4 +1,4 @@<br>
>> > -// RUN: %clang_cc1 -fno-rtti -emit-llvm -o %t.ll -fdump-vtable-layouts<br>
>> > %s -triple=i386-pc-win32 >%t<br>
>> > +// RUN: %clang_cc1 -std=c++11 -fms-extensions -fno-rtti -emit-llvm -o<br>
>> > %t.ll -fdump-vtable-layouts %s -triple=i386-pc-win32 >%t<br>
>> > // RUN: FileCheck %s < %t<br>
>> > // RUN: FileCheck --check-prefix=MANGLING %s < %t.ll<br>
>> ><br>
>> > @@ -764,3 +764,11 @@ struct W : B, Y {<br>
>> ><br>
>> > W::W() {}<br>
>> > }<br>
>> > +<br>
>> > +namespace Test13 {<br>
>> > +struct __declspec(dllexport) A {<br>
>> > + // CHECK-LABEL: VFTable for 'Test13::A' (1 entry).<br>
>> > + // CHECK-NEXT: 0 | void Test13::A::f() [deleted]<br>
>> > + virtual void f() = delete;<br>
>> > +};<br>
>> > +}<br>
>> ><br>
>> ><br>
>> > _______________________________________________<br>
>> > cfe-commits mailing list<br>
>> > <a href="mailto:cfe-commits@cs.uiuc.edu" target="_blank">cfe-commits@cs.uiuc.edu</a><br>
>> > <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
><br>
><br>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>