[llvm-commits] LLD: patch Program Headers

Hemant Kulkarni khemant at codeaurora.org
Tue Nov 6 15:59:10 PST 2012


Attached is the patch with changes as per review comments.

-Hemant


--
Hemant Kulkarni
khemant at codeaurora.org
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by the Linux Foundation

-----Original Message-----
From: Michael Spencer [mailto:bigcheesegs at gmail.com] 
Sent: Friday, November 02, 2012 6:36 PM
To: Hemant Kulkarni
Cc: llvm-commits at cs.uiuc.edu
Subject: Re: [llvm-commits] LLD: patch Program Headers

On Fri, Nov 2, 2012 at 3:28 PM, Hemant Kulkarni <khemant at codeaurora.org> wrote:
>
> MSVC doesn't like this in debug mode. The fix is to add:
>
> #if defined(_ITERATOR_DEBUG_LEVEL) && _ITERATOR_DEBUG_LEVEL == 2
>   bool operator()(Chunk<target_endianness, is64Bits> *A,
>                   Chunk<target_endianness, is64Bits> *B) {
>     return A->group() < B->group();
>   }
> #endif
>
> If I put a preprocessor to include a certain version of the overloaded operator, I will also need to add a preprocessor and make sure I pass in an object of that type in the equal_range function. Is adding such #ifdef a good idea?
> We could alternatively just keep the both operands chunks version so all compilers build it at all levels. What do you say?
>
> -Hemant
>
>
> --
> Hemant Kulkarni
> khemant at codeaurora.org
> Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, 
> hosted by the Linux Foundation

Why would you need to use the preprocessor in this case? equal_range with a value of type int will never require this overload. It's a bug in vc++ that ChunkComparator requires it.

- Michael Spencer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: phdr.diff
Type: application/octet-stream
Size: 40026 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121106/9c6f32ff/attachment.obj>


More information about the llvm-commits mailing list