[LLVMdev] Poolalloc asserts when passing in pool descriptors

John Criswell criswell at uiuc.edu
Fri Nov 13 13:12:20 PST 2009


Dear Harmen,

You're correct.  I've applied the fix.

Thanks!

-- John T.


Harmen van der Spek wrote:
> Hi,
>
> The poolalloc library fails in TransformFunctionBody.cpp, line 746
>
> ---
> Value *ArgVal = ConstantAggregateZero::get(PoolAllocate::PoolDescPtrTy);
> ---
>
> opt -load /path_to_lib/libpoolalloc.dylib -poolalloc constaggr.bc -o 
> opt.bc -f
>
> triggers the problem (bc file attached).
>
> Assertion failed: ((isa<StructType>(Ty) || isa<ArrayType>(Ty) || 
> isa<VectorType>(Ty)) && "Cannot create an aggregate zero of 
> non-aggregate type!"), function get, file lib/VMCore/Constants.cpp, line 
> 859.
>
> Changing it to
> Value *ArgVal = Constant::getNullValue(PoolAllocate::PoolDescPtrTy);
>
> which was used in revision 72001, fixes the problem.
>
>
> Harmen
>   




More information about the llvm-dev mailing list