[LLVMdev] MSVC compiling issue
Jakob Stoklund Olesen
stoklund at 2pi.dk
Tue Mar 8 11:14:11 PST 2011
On Mar 8, 2011, at 1:07 AM, Olaf Krzikalla wrote:
> Hi @llvm,
>
> building a debug version under MSVC 9 leads to a compiler error due to a
> mix of different types in a call to upper_bound. I have attached a
> hot-fix but I'm rather unsure if it should be applied as it is, since
> IMHO the reason is a MSVC library bug ("IMHO", because I don't know the
> requirements imposed to the predicate by the standard).
I hoped the symmetric methods would be enough to trick MSVC into compiling it.
Is that extra method getting called? What happens if you stick assert(0) in there?
>
> Index: lib/CodeGen/LiveInterval.cpp
> ===================================================================
> --- lib/CodeGen/LiveInterval.cpp (revision 127221)
> +++ lib/CodeGen/LiveInterval.cpp (working copy)
> @@ -39,6 +39,9 @@
> bool operator()(const LiveRange &A, SlotIndex B) const {
> return A.end < B;
> }
> + bool operator()(const LiveRange &A, const LiveRange &B) const {
> + return A.end < B.end;
> + }
> };
> }
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
More information about the llvm-dev
mailing list