The line comes up on a back trace using gdb. I think it's the right line (I
have tried it on two separate machines one using Fedora 11 and g++ 4.4.x and the
other Ubunto and g++ 4.3.3) and the situation is exceptionally odd since it only
occurs when compiling my Runtime.cpp and doesnt happen when compiling other
files. This is with LLVM 2.5.
I did look at the Type.cpp code and it should be impossible but it's the
error I am getting.
--- On Sat, 7/4/09, Nick Lewycky <nicholas at mxc.ca> wrote:
> From: Nick Lewycky <nicholas at mxc.ca>
> Subject: Re: [LLVMdev] A beginner question
> To: "LLVM Developers Mailing List" <llvmdev at cs.uiuc.edu>
> Date: Saturday, July 4, 2009, 9:06 AM
> Carter Cheng wrote:
> > I feel a bit bad for always asking beginner questions
> here but I am having some difficulties with a runtime error
> with which I could use some help diagnosing.
> >
> > 1) I am getting the assertion failure
> >
> > main: Type.cpp:1309: static llvm::PointerType*
> llvm::PointerType::get(const llvm::Type*, unsigned int):
> Assertion `ValueType && "Can't get a pointer to
> <null> type!"' failed.
> >
> > from this line-
> >
> > fields.push_back(
> llvm::PointerType::getUnqual(llvm::Type::Int32Ty) );
> >
> > Is something needed to initialize the
> llvm::Type::Int32Ty?
>
> Type::Int32Ty is a static const Type* with an initializer.
> You might
> need static constructors to run in order to initialize it,
> but in C++
> that should require no action on your part.
>
> It should be impossible for that line of code to cause that
> assertion.
> Are you sure you're blaming the right line? If so then you
> probably have
> a larger problem with your C++ environment, such as LLVM
> being
> miscompiled by your system compiler. (It's not one of the
> ones listed on
> llvm.org/docs/GettingStarted.html#brokengcc is it?)
>
> Nick
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu
> http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>