Vladimir Merzliakov
2004-Jul-10 09:06 UTC
[LLVMdev] Re: [llvm-commits] CAUTION: Type != Value
In VMCore/Module.cpp i found line (254): ((Value*)Ty)->setName(Name, &ST); 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. In Chris Lattner remove setName from Type class http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20040705/015869.html And then i remove bogus code line as may not correct but tempory workaround for me. Vladimir
Vladimir Merzliakov
2004-Jul-10 10:17 UTC
[LLVMdev] Re: [llvm-commits] CAUTION: Type != Value
> In VMCore/Module.cpp i found line (254): > > ((Value*)Ty)->setName(Name, &ST); >[skip]> And then i remove bogus code line as may not correct but temporyworkaround> for me.Now my YAFL frontend can be compiled but it generete invalid code as result of change. Vladimir
Vladimir, 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. Reid. On Sat, 2004-07-10 at 07:01, Vladimir Merzliakov wrote:> In VMCore/Module.cpp i found line (254): > > ((Value*)Ty)->setName(Name, &ST); > > 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. > > In Chris Lattner remove setName from Type class > http://mail.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20040705/015869.html > > And then i remove bogus code line as may not correct but tempory workaround > for me. > > Vladimir > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev-------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20040710/1312d237/attachment.sig>
Vladimir Merzliakov
2004-Jul-10 11:03 UTC
[LLVMdev] Re: [llvm-commits] CAUTION: Type != Value
> 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 ? Vladimir -------------- next part -------------- A non-text attachment was scrubbed... Name: Module.patch Type: application/octet-stream Size: 345 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20040710/78196553/attachment.obj>
Apparently Analagous Threads
- [LLVMdev] Re: [llvm-commits] CAUTION: Type != Value
- [LLVMdev] Recursive Types using the llvm support library
- [LLVMdev] Recursive Types using the llvm support library
- [LLVMdev] Re: [llvm-commits] CAUTION: Type != Value
- [LLVMdev] Recursive Types using the llvm support library