[LLVMdev] MSVC compiling issue

Olaf Krzikalla Olaf.Krzikalla at tu-dresden.de
Wed Mar 9 02:32:46 PST 2011


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 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) ?

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.


Best regards
Olaf Krzikalla



More information about the llvm-dev mailing list