[llvm-commits] PBQP: alloca causing problems on MingW32
Kenneth Boyd
zaimoni at zaimoni.com
Sun Oct 5 19:51:17 PDT 2008
Kenneth Boyd wrote:
> Configure line:
> sh-3.1$ ../llvm.svn/configure --enable-assertions
> --enable-expensive-checks --disable-threads --disable-cbe-printf-a
> --disable-shared --enable-static
>
> Compile error is:
> llvm[2]: Compiling PBQP.cpp for Debug+Checks build
> c:/CPP_App/llvm.svn/lib/CodeGen/PBQP.cpp: In function 'void
> llvm::compute_tc_info(llvm::pbqp*, llvm::adjnode*)':
> c:/CPP_App/llvm.svn/lib/CodeGen/PBQP.cpp:1053: error: 'alloca' was not
> declared in this scope
> make[2]: *** [/CPP_App/llvm.svn.obj/lib/CodeGen/Debug+Checks/PBQP.o] Error 1
>
> Ideally, I'll be taking a look at this later tonight (assuming I don't
> get swamped). It seems that most of the files that use alloca also
> #include <malloc.h> somewhere (haven't checked how this works for
> ExecutionEngine/ExecutionEngine.cpp yet, but all of the uses in the
> System subdirectory are this way).
>
It appears that the correct fix is #include "llvm/Config/alloca.h" .
I'm attaching two patches to choose from:
* PBQP.minimal.patch is a one-line change.
* PBQP.standardize.patch puts the #includes in PBQP.cpp into "standard
order".
Kenneth
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: PBQP.minimal.patch
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20081005/db3763aa/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: PBQP.standardize.patch
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20081005/db3763aa/attachment-0001.ksh>
More information about the llvm-commits
mailing list