[llvm-commits] [llvm] r171829 - /llvm/trunk/lib/Support/DeltaAlgorithm.cpp
Timur Iskhodzhanov
timurrrr at google.com
Fri Jan 11 06:45:22 PST 2013
2013/1/11 Timur Iskhodzhanov <timurrrr at google.com>:
> 2013/1/9 Timur Iskhodzhanov <timurrrr at google.com>:
>> Hi Lenny,
>>
>> I believe your change has broken down the Windows build?
>> Can you please fix or revert?
>>
>> 1>Compiling...
>> 1>DeltaAlgorithm.cpp
>> 1>..\..\..\llvm\lib\Support\DeltaAlgorithm.cpp(32) : error C2664:
>> 'std::_Tree<_Traits>::iterator::iterator(std::_Tree_nod<_Traits>::_Node
>> *,const std::_Tree<_Traits> *)' : cannot convert parameter 1 from
>> 'std::_Tree<_Traits>::const_iterator' to
>> 'std::_Tree_nod<_Traits>::_Node *'
>> 1> with
>> 1> [
>> 1> _Traits=std::_Tset_traits<llvm::DeltaAlgorithm::change_ty,std::less<llvm::DeltaAlgorithm::change_ty>,std::allocator<llvm::DeltaAlgorithm::change_ty>,false>
>> 1> ]
>> 1> No user-defined-conversion operator available that can
>> perform this conversion, or the operator cannot be called
>> 1>..\..\..\llvm\lib\Support\DeltaAlgorithm.cpp(36) : error C2664:
>> 'std::set<_Kty>::set(const std::less<_Ty> &,const std::allocator<_Ty>
>> &)' : cannot convert parameter 1 from
>> 'std::_Tree<_Traits>::const_iterator' to 'const std::less<_Ty> &'
>> 1> with
>> 1> [
>> 1> _Kty=llvm::DeltaAlgorithm::change_ty,
>> 1> _Ty=llvm::DeltaAlgorithm::change_ty
>> 1> ]
>> 1> and
>> 1> [
>> 1> _Traits=std::_Tset_traits<llvm::DeltaAlgorithm::change_ty,std::less<llvm::DeltaAlgorithm::change_ty>,std::allocator<llvm::DeltaAlgorithm::change_ty>,false>
>> 1> ]
>> 1> and
>> 1> [
>> 1> _Ty=llvm::DeltaAlgorithm::change_ty
>> 1> ]
>> 1> Reason: cannot convert from
>> 'std::_Tree<_Traits>::const_iterator' to 'const std::less<_Ty>'
>
> FTR, this error has happened on my windows bot with VS2008 installed.
Just checked - my local VS2010 is fine.
I think LLVM doesn't require VS2010 yet?
>> 2013/1/8 Lenny Maiorani <lenny at colorado.edu>:
>>> Author: lenny
>>> Date: Mon Jan 7 19:08:52 2013
>>> New Revision: 171829
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=171829&view=rev
>>> Log:
>>> Split changeset_ty using iterators instead of loops.
>>>
>>> Modified:
>>> llvm/trunk/lib/Support/DeltaAlgorithm.cpp
>>>
>>> Modified: llvm/trunk/lib/Support/DeltaAlgorithm.cpp
>>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/DeltaAlgorithm.cpp?rev=171829&r1=171828&r2=171829&view=diff
>>> ==============================================================================
>>> --- llvm/trunk/lib/Support/DeltaAlgorithm.cpp (original)
>>> +++ llvm/trunk/lib/Support/DeltaAlgorithm.cpp Mon Jan 7 19:08:52 2013
>>> @@ -27,13 +27,15 @@
>>>
>>> void DeltaAlgorithm::Split(const changeset_ty &S, changesetlist_ty &Res) {
>>> // FIXME: Allow clients to provide heuristics for improved splitting.
>>> + // Get the iterator to the middle.
>>> + unsigned N = S.size() / 2;
>>> + changeset_ty::iterator middle(S.begin());
>>> + std::advance(middle, N);
>>> +
>>> + // Create each vector using the middle as the split.
>>> + changeset_ty LHS(S.begin(), middle);
>>> + changeset_ty RHS(middle, S.end());
>>>
>>> - // FIXME: This is really slow.
>>> - changeset_ty LHS, RHS;
>>> - unsigned idx = 0, N = S.size() / 2;
>>> - for (changeset_ty::const_iterator it = S.begin(),
>>> - ie = S.end(); it != ie; ++it, ++idx)
>>> - ((idx < N) ? LHS : RHS).insert(*it);
>>> if (!LHS.empty())
>>> Res.push_back(LHS);
>>> if (!RHS.empty())
>>>
>>>
>>> _______________________________________________
>>> llvm-commits mailing list
>>> llvm-commits at cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list