[llvm-commits] LLD: patch Program Headers

Michael Spencer bigcheesegs at gmail.com
Fri Nov 2 16:35:33 PDT 2012


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



More information about the llvm-commits mailing list