[LLVMdev] Built LLVM 1.8 on VC8, invalid iterator issue/fix, some questions

Chris Lattner sabre at nondot.org
Thu Aug 24 21:11:48 PDT 2006


On Thu, 24 Aug 2006 srhilber at ncsu.edu wrote:
> I've managed to get LLVM 1.8 to build properly with MSVC8 with some
> effort. Most of the changes necessary were very minor C++ usage issues;
> for instance, VC8 can't deal with prototyping something that's really a
> class as 'struct Foo;' or vice versa (it creates issues with matching
> function signatures during linking.)

Can you send in a patch for this?  It would be good to get this fixed in 
CVS.

> However, there appears to be some issue with using an invalid iterator in
> the X86 backend that appears when I build with VC8. I've managed to fix it
> by duplicating the std::vector in question before iterating through it,
> but I'm too new to the code to be able to say whether it's the "right"
> fix. The offending bit of generated code is this area from
> X86GenDAGISel.inc, line 84+:

Ok, see below.

> Anyway, I've got a few questions:
> 1) First thing, is VC8 support desired at the moment?

Yes!

> If so I can try to
> put together a patch, although I'd likely have to install VS7.1 to edit
> the project file while maintaining compatibility with 7.1.

Please do.  I'd much prefer that we keep 7.1 project files, just for 
compatibility with more VC versions.

> 2) Could someone who knows more about the context of the invalid iterator
> issue tell me what the 'right' fix would be? Is this just something
> g++/libstdc++ happens to let pass silently and it really needs changing,
> or is VC8 screwing it up somehow? If it does needs changing, what's the
> proper way of doing it?

The right fix, I believe, is to update to CVS.  The entire problematic 
piece of code is gone. :)

-Chris

-- 
http://nondot.org/sabre/
http://llvm.org/



More information about the llvm-dev mailing list