Type is not Value now and for me this code call
llvm::DerivedType::addAbstractTypeUser (I think it have same index in Type
VMT in as setName in Value VMT)
with random argument values and terminated with assert fail:
Assertion failed: (isAbstract() && "addAbstractTypeUser: Current type not
abstract!"), function addAbstractTypeUser, file
/home/wanderer/pkg/build/llvm/src/llvm/include/llvm/DerivedTypes.h, line 73.
As you noted, the cast to Value* from (I presume) Type* is now invalid
as there is no inheritance relationship. You can give a type a name by
converting:
As you noted, the cast to Value* from (I presume) Type* is now invalid
as there is no inheritance relationship. You can give a type a name by
converting:
Ty->setName(Name, &ST)
to:
ST.insert(Name, Ty)
Hope that helps.
This is resolve problem for me.
Is attached patch ok for llvm/lib/VMCore/Module.cpp ?
I thought Chris had already made that patch but apparently not. Anyway,
I've applied it. Thanks very much for noticing this and sorry for the
grief it caused you.