[lld] r198468 - [MachO] Add some missing NListTypes.

Nick Kledzik kledzik at apple.com
Mon Jan 6 14:53:46 PST 2014


On Jan 4, 2014, at 11:43 AM, Joey Gouly <joey.gouly at gmail.com> wrote:

> Does something like this look good?
> 
> Now I get:
> ../projects/lld/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp:247:47: warning: 'N_PBUD' is deprecated [-Wdeprecated-declarations]
>     io.enumCase(value, "N_PBUD", llvm::MachO::N_PBUD);
>                                               ^
> ../include/llvm/Support/MachO.h:302:7: note: 'N_PBUD' declared here
>       N_PBUD LLVM_DEPRECATED = 0xcu,
>       ^
> ../projects/lld/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp:248:47: warning: 'N_INDR' is deprecated [-Wdeprecated-declarations]
>     io.enumCase(value, "N_INDR", llvm::MachO::N_INDR);
>                                               ^
> ../include/llvm/Support/MachO.h:303:7: note: 'N_INDR' declared here
>       N_INDR LLVM_DEPRECATED = 0xau
>       ^
> 2 warnings generated.
> 
> 
> But do we not want to support these at all? Surely someone *could* use lld with something that does contain N_PBUD or N_INR?
N_PBUD was only used on PowerPC binaries that were prebound.  I can’t imagine anyone wanting a yaml version of those old bits.

We have enough work to do just getting modern mach-o linking with lld.  I don’t want to spend cycles worrying about older mach-o variants.

-Nick


> 
> 
> On 4 January 2014 01:59, Nick Kledzik <kledzik at apple.com> wrote:
> 
> On Jan 3, 2014, at 5:50 PM, Joey Gouly <joey.gouly at gmail.com> wrote:
> 
>> Weird, I'm sure I added it because I was hitting it in some tests, but re-running those, and it looks like I'm not.
>> 
>> Shall we revert this? (If I hit those again, I'll look closer)
> 
> Is there a way to mark the underlying constants deprecated or obsolete in llvm/Support/MachO.h?  I’d like to clean up the MachO.h file that way.  Then you could not accidentally use them in lld.
> 
> -Nick
> 
> 
>> 
>> 
>> On 4 January 2014 01:38, Nick Kledzik <kledzik at apple.com> wrote:
>> 
>> On Jan 3, 2014, at 5:22 PM, Joey Gouly <joey.gouly at gmail.com> wrote:
>> > Author: joey
>> > Date: Fri Jan  3 19:22:05 2014
>> > New Revision: 198468
>> >
>> > URL: http://llvm.org/viewvc/llvm-project?rev=198468&view=rev
>> > Log:
>> > [MachO] Add some missing NListTypes.
>> >
>> > Modified:
>> >    lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp
>> >
>> > Modified: lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp
>> > URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp?rev=198468&r1=198467&r2=198468&view=diff
>> > ==============================================================================
>> > --- lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp (original)
>> > +++ lld/trunk/lib/ReaderWriter/MachO/MachONormalizedFileYAML.cpp Fri Jan  3 19:22:05 2014
>> > @@ -244,6 +244,8 @@ struct ScalarEnumerationTraits<NListType
>> >     io.enumCase(value, "N_UNDF",  llvm::MachO::N_UNDF);
>> >     io.enumCase(value, "N_ABS",   llvm::MachO::N_ABS);
>> >     io.enumCase(value, "N_SECT",  llvm::MachO::N_SECT);
>> > +    io.enumCase(value, "N_PBUD",  llvm::MachO::N_PBUD);
>> N_PUBD is obsolete and has not been used for 5+ years.
>> 
>> 
>> > +    io.enumCase(value, "N_INDR",  llvm::MachO::N_INDR);
>> This too is no longer used, but I have a bug that there is a case for bringing it back.
>> 
>> -Nick
>> 
>> 
>> 
>> 
>> 
> 
> 
> <deprecated_enums.diff>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140106/dfa9217a/attachment.html>


More information about the llvm-commits mailing list