[LLVMdev] Build fails on windows using VS2008

Marius Wachtler malloc at inode.at
Tue May 26 17:43:27 PDT 2009


Hello

The current svn revision fails to compile on windows using Visual Studio
2008.
I'm getting:

1>ScalarEvolutionExpander.cpp
1>F:\dev\llvm\include\llvm/Analysis/ScalarEvolutionExpander.h(29) : warning
C4099: 'llvm::SCEVExpander' : type name first seen using 'class' now seen
using 'struct'
1>        F:\dev\llvm\include\llvm/Analysis/ScalarEvolution.h(216) : see
declaration of 'llvm::SCEVExpander'
1>..\..\..\lib\Analysis\ScalarEvolutionExpander.cpp(446) : error C2075:
'RestArray' : array initialization needs curly braces
1>..\..\..\lib\Analysis\ScalarEvolutionExpander.cpp(446) : error C2248:
'llvm::SCEVHandle::SCEVHandle' : cannot access private member declared in
class 'llvm::SCEVHandle'
1>        F:\dev\llvm\include\llvm/Analysis/ScalarEvolution.h(152) : see
declaration of 'llvm::SCEVHandle::SCEVHandle'
1>        F:\dev\llvm\include\llvm/Analysis/ScalarEvolution.h(150) : see
declaration of 'llvm::SCEVHandle'

Attached you can find a patch which which makes the code compile on my
machine.

Sincerely yours
Marius Wachtler

Index: lib/Analysis/ScalarEvolutionExpander.cpp
===================================================================
--- lib/Analysis/ScalarEvolutionExpander.cpp    (revision 72444)
+++ lib/Analysis/ScalarEvolutionExpander.cpp    (working copy)
@@ -443,7 +443,7 @@
     // comments on expandAddToGEP for details.
     if (SE.TD) {
       SCEVHandle Base = S->getStart();
-      SCEVHandle RestArray[1] = Rest;
+      SCEVHandle RestArray[1] = { Rest };
       // Dig into the expression to find the pointer base for a GEP.
       ExposePointerBase(Base, RestArray[0], SE);
       // If we found a pointer, expand the AddRec with a GEP.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090527/b02cb2ab/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: arrayInit.patch
Type: application/octet-stream
Size: 631 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090527/b02cb2ab/attachment.obj>


More information about the llvm-dev mailing list