[LLVMdev] Windows assertion failure

Paul J. Lucas paul at lucasmail.org
Mon May 28 09:30:24 PDT 2012


Given this small program:

> #include <llvm/DerivedTypes.h>
> #include <llvm/LLVMContext.h>
> 
> using namespace llvm;
> 
> int main( int argc, char const *argv[] ) {
>   LLVMContext &ctx = getGlobalContext();
> 
>   Type *void_type( Type::getVoidTy( ctx ) );
>   PointerType *void_ptr_type( void_type->getPointerTo() );
> 
>   return 0;
> }

When compiled using the clang binaries with MinGW32 and run, I get:

> Assertion failed: isValidElementType(EltTy) && "Invalid type for pointer element!", file /Users/asl/Projects/llvm/release/3.1/src/lib/VMCore/Type.cpp, line 748

Why?

- Paul





More information about the llvm-dev mailing list