[llvm-commits] Transforms/Scalar/SROA build issue with MSVC2008

Axel Naumann Axel.Naumann at cern.ch
Mon Sep 17 11:12:53 PDT 2012


Hi Benjamin,

Excellent! I confirm that this fixed the build. Thanks a lot!

Cheers, Axel

Benjamin Kramer <benny.kra at gmail.com> wrote:

>
>On 17.09.2012, at 17:01, Axel Naumann <Axel.Naumann at cern.ch> wrote:
>
>> Hi,
>> 
>> <http://llvm.org/docs/GettingStartedVS.html> says I should expect
>> lib/Transforms/Scalar/SROA.cpp to build with MS Visual Studio 2008
>> (version number 15.00.30729.01) + CMake in Debug. But it doesn't for
>me:
>> 
>> 94>c:\Program Files (x86)\Microsoft Visual Studio
>> 9.0\VC\include\xutility(285) : error C2784: 'bool std::operator
><(const
>> std::_Tree<_Traits> &,const std::_Tree<_Traits> &)' : could not
>deduce
>> template argument for 'const std::_Tree<_Traits> &' from 'const
>uint64_t'
>> 
>> 94>        c:\Program Files (x86)\Microsoft Visual Studio
>> 9.0\VC\include\xtree(1466) : see declaration of 'std::operator <'
>> 
>> 94>        c:\Program Files (x86)\Microsoft Visual Studio
>> 9.0\VC\include\algorithm(2264) : see reference to function template
>> instantiation 'bool std::_Debug_lt<T,_Ty>(_Ty1 &,const _Ty2 &,const
>> wchar_t *,unsigned int)' being compiled
>> 
>> 94>        with
>> 
>> 94>        [
>> 
>> 94>           
>T=`anonymous-namespace'::AllocaPartitioning::Partition,
>> 
>> 94>            _Ty=uint64_t,
>> 
>> 94>           
>_Ty1=`anonymous-namespace'::AllocaPartitioning::Partition,
>> 
>> 94>            _Ty2=uint64_t
>> 
>> 94>        ]
>> 
>> 94>        c:\Program Files (x86)\Microsoft Visual Studio
>> 9.0\VC\include\algorithm(2276) : see reference to function template
>> instantiation '_FwdIt
>>
>std::_Lower_bound<`anonymous-namespace'::AllocaPartitioning::Partition*,_Ty,std::iterator_traits<_Iter>::difference_type>(_FwdIt,_FwdIt,const
>> _Ty &,_Diff *)' being compiled
>> 
>> 94>        with
>> 
>> 94>        [
>> 
>> 94>
>> _FwdIt=`anonymous-namespace'::AllocaPartitioning::Partition *,
>> 
>> 94>            _Ty=uint64_t,
>> 
>> 94>           
>_Iter=`anonymous-namespace'::AllocaPartitioning::Partition *,
>> 
>> 94>
>>
>_Diff=std::iterator_traits<`anonymous-namespace'::AllocaPartitioning::Partition
>> *>::difference_type
>> 
>> 94>        ]
>> 
>> 94>
>> ..\..\..\..\cling-src-r45920\lib\Transforms\Scalar\SROA.cpp(790) :
>see
>> reference to function template instantiation '_FwdIt
>>
>std::lower_bound<`anonymous-namespace'::AllocaPartitioning::iterator,uint64_t>(_FwdIt,_FwdIt,const
>> _Ty &)' being compiled
>> 
>> 94>        with
>> 
>> 94>        [
>> 
>> 94>           
>_FwdIt=`anonymous-namespace'::AllocaPartitioning::iterator,
>> 
>> 94>            _Ty=uint64_t
>> 
>> 94>        ]
>> 
>> 94>c:\Program Files (x86)\Microsoft Visual Studio
>> 9.0\VC\include\xutility(285) : error C2784: 'bool std::operator
><(const
>> std::list<_Ty,_Ax> &,const std::list<_Ty,_Ax> &)' : could not deduce
>> template argument for 'const std::list<_Ty,_Ax> &' from 'const
>uint64_t'
>> 
>> 94>        c:\Program Files (x86)\Microsoft Visual Studio
>> 9.0\VC\include\list(1310) : see declaration of 'std::operator <'
>> 
>> 94>c:\Program Files (x86)\Microsoft Visual Studio
>> 9.0\VC\include\xutility(285) : error C2784: 'bool std::operator
><(const
>> std::vector<_Ty,_Alloc> &,const std::vector<_Ty,_Alloc> &)' : could
>not
>> deduce template argument for 'const std::vector<_Ty,_Alloc> &' from
>> 'const uint64_t'
>> 
>> 94>        c:\Program Files (x86)\Microsoft Visual Studio
>> 9.0\VC\include\vector(1322) : see declaration of 'std::operator <'
>> 
>> 94>c:\Program Files (x86)\Microsoft Visual Studio
>> 9.0\VC\include\xutility(285) : error C2784: 'bool std::operator
><(const
>> std::basic_string<_Elem,_Traits,_Alloc> &,const _Elem *)' : could not
>> deduce template argument for 'const
>> std::basic_string<_Elem,_Traits,_Alloc> &' from 'const uint64_t'
>> 
>> 94>        c:\Program Files (x86)\Microsoft Visual Studio
>> 9.0\VC\include\string(150) : see declaration of 'std::operator <'
>> 
>> 94>c:\Program Files (x86)\Microsoft Visual Studio
>> 9.0\VC\include\xutility(285) : error C2784: 'bool std::operator
><(const
>> _Elem *,const std::basic_string<_Elem,_Traits,_Alloc> &)' : could not
>> deduce template argument for 'const _Elem *' from 'const uint64_t'
>> 
>> 94>        c:\Program Files (x86)\Microsoft Visual Studio
>> 9.0\VC\include\string(140) : see declaration of 'std::operator <'
>> 
>> 94>c:\Program Files (x86)\Microsoft Visual Studio
>> 9.0\VC\include\xutility(285) : error C2784: 'bool std::operator
><(const
>> std::basic_string<_Elem,_Traits,_Alloc> &,const
>> std::basic_string<_Elem,_Traits,_Alloc> &)' : could not deduce
>template
>> argument for 'const std::basic_string<_Elem,_Traits,_Alloc> &' from
>> 'const uint64_t'
>> 
>> 94>        c:\Program Files (x86)\Microsoft Visual Studio
>> 9.0\VC\include\string(130) : see declaration of 'std::operator <'
>> 
>> 94>c:\Program Files (x86)\Microsoft Visual Studio
>> 9.0\VC\include\xutility(285) : error C2784: 'bool std::operator
><(const
>> std::reverse_iterator<_RanIt> &,const std::reverse_iterator<_RanIt2>
>&)'
>> : could not deduce template argument for 'const
>> std::reverse_iterator<_RanIt> &' from 'const uint64_t'
>> 
>> 94>        c:\Program Files (x86)\Microsoft Visual Studio
>> 9.0\VC\include\xutility(2262) : see declaration of 'std::operator <'
>> 
>> 94>c:\Program Files (x86)\Microsoft Visual Studio
>> 9.0\VC\include\xutility(285) : error C2784: 'bool std::operator
><(const
>> std::_Revranit<_RanIt,_Base> &,const std::_Revranit<_RanIt2,_Base2>
>&)'
>> : could not deduce template argument for 'const
>> std::_Revranit<_RanIt,_Base> &' from 'const uint64_t'
>> 
>> 94>        c:\Program Files (x86)\Microsoft Visual Studio
>> 9.0\VC\include\xutility(2072) : see declaration of 'std::operator <'
>> 
>> 94>c:\Program Files (x86)\Microsoft Visual Studio
>> 9.0\VC\include\xutility(285) : error C2784: 'bool std::operator
><(const
>> std::pair<_Ty1,_Ty2> &,const std::pair<_Ty1,_Ty2> &)' : could not
>deduce
>> template argument for 'const std::pair<_Ty1,_Ty2> &' from 'const
>uint64_t'
>> 
>> 94>        c:\Program Files (x86)\Microsoft Visual Studio
>> 9.0\VC\include\utility(99) : see declaration of 'std::operator <'
>> 
>> 94>c:\Program Files (x86)\Microsoft Visual Studio
>> 9.0\VC\include\xutility(285) : error C2677: binary '<' : no global
>> operator found which takes type
>> '`anonymous-namespace'::AllocaPartitioning::Partition' (or there is
>no
>> acceptable conversion)
>> 
>> I'm surprised nobody else is seeing it? If that is actually not
>> surprising then I'll try to come up with a patch...
>
>MSVC 2008 is really picky about lower_bound, this was changed in later
>versions of Microsoft's compiler. Most people have migrated to VC 2010,
>so the breakage wasn't noticed. I pushed a fix in r164035, but I
>couldn't verify that it works, I don't have a copy of visual studio.
>
>- Ben
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120917/720a104d/attachment.html>


More information about the llvm-commits mailing list