[LLVMdev] MSVC compiling issue

Jakob Stoklund Olesen stoklund at 2pi.dk
Wed Mar 9 07:20:31 PST 2011


On Mar 9, 2011, at 2:32 AM, Olaf Krzikalla <Olaf.Krzikalla at tu-dresden.de> wrote:

> Hi @llvm,
> 
> Am 08.03.2011 20:14, schrieb Jakob Stoklund Olesen:
>> Is that extra method getting called? What happens if you stick assert(0) in there?
> That won't work either (that is, the assert fires). In debug mode the MSVC lib tries to test the ordering of the sequence. And it uses the yielded predicate for this (which in this particular case is a very bad idea).

I see. I guess that makes sense if it is written assuming symmetric types.

> 
>> I hoped the symmetric methods would be enough to trick MSVC into compiling it.
> Does that mean, that gcc actually only needs
> 
> bool operator()(const LiveRange&A, SlotIndex B) ?

Actually, the other way around.

> According to C++(2003) 25.0.0.8 the answer is "yes", however that section talks about BinaryPredicate and not Compare. The standard is rather unclear at this point and I'm going over to comp.std.c++ to ask.

Howard Hinnant was kind enough to clarify this a while back.

http://lists.cs.uiuc.edu/pipermail/cfe-dev/2010-August/010379.html
> 






More information about the llvm-dev mailing list