[llvm] r207350 - ARM: MSVC does not support = default
David Blaikie
dblaikie at gmail.com
Mon Apr 28 10:34:56 PDT 2014
On Sun, Apr 27, 2014 at 8:58 AM, Saleem Abdulrasool
<compnerd at compnerd.org> wrote:
> On Sunday, April 27, 2014, Aaron Ballman <aaron at aaronballman.com> wrote:
>>
>> On Sun, Apr 27, 2014 at 1:28 AM, Saleem Abdulrasool
>> <compnerd at compnerd.org> wrote:
>> > Author: compnerd
>> > Date: Sun Apr 27 00:28:10 2014
>> > New Revision: 207350
>> >
>> > URL: http://llvm.org/viewvc/llvm-project?rev=207350&view=rev
>> > Log:
>> > ARM: MSVC does not support = default
>> >
>> > Explicitly "implement" the destructor as MSVC does not support defaulted
>> > methods
>> > yet.
>> >
>> > Modified:
>> > llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMWinCOFFObjectWriter.cpp
>> >
>> > Modified:
>> > llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMWinCOFFObjectWriter.cpp
>> > URL:
>> > http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMWinCOFFObjectWriter.cpp?rev=207350&r1=207349&r2=207350&view=diff
>> >
>> > ==============================================================================
>> > --- llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMWinCOFFObjectWriter.cpp
>> > (original)
>> > +++ llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMWinCOFFObjectWriter.cpp
>> > Sun Apr 27 00:28:10 2014
>> > @@ -23,7 +23,7 @@ public:
>> > : MCWinCOFFObjectTargetWriter(COFF::IMAGE_FILE_MACHINE_ARMNT) {
>> > assert(!Is64Bit && "AArch64 support not yet implemented");
>> > }
>> > - virtual ~ARMWinCOFFObjectWriter() = default;
>> > + virtual ~ARMWinCOFFObjectWriter() { }
>>
>> Would it make more sense to add LLVM_DEFAULTED_FUNCTION to Compiler.h
>> to complement LLVM_DELETED_FUNCTION?
>
>
> Maybe I'm missing something, how would the macro work for operator= or copy
> constructors? Unlike the delete function which can be made private, the
> only way that I can think of getting equivalent behaviour is to implement
> them.
Yeah, but we could name the macro to indicate that it can only be used
for default ctors and dtor. Though the benefits of triviality might
not be sufficient to bother with all that macro stuff.
More information about the llvm-commits
mailing list