Constants.cpp get() assertion failed

I work on eclipse for cpp of linux.

static llvm::ConstantAggregateZero* llvm::ConstantAggregateZero::get(llvm::Type*): Assertion’(Ty->isStructTy() || Ty->isArrayTy() || Ty->isVectorTy()) && “Cannot create an aggregate zero of non-aggregate type!”’ failed. What are some possible reasons? Another machine with the same enviroment including llvm and eclipse version has a good performance. I can’t explain it.

Thank you.

Presumably, some piece of code passed a Type that isn’t a struct, array, or vector into ConstantAggregateZero::get. (Well, either that, or there’s some icky memory corruption going on somewhere, which would be bad.)

If you’re writing code that uses LLVM, it may be good to check that the code you’re working with isn’t accidentally doing this. OTOH, if this assertion failure is something you’re getting from a prebuilt tool (e.g. clang, …), please report this bug to whoever you got the tool from. :slight_smile: