[LLVMdev] Problems when refining type

Scott Graham sgraham at gmail.com
Mon Sep 8 17:19:51 PDT 2008

>> Can anyone explain what I'm doing wrong here?
> It looks like a bug; the type map is somehow holding onto a stale
> pointer to an opaque type.  That said, refining a pointer type is a
> very unusual operation; I'd suggest sticking to refining opaque types.

Ah, that would be it. Thanks!

Could I suggest adding:

  assert(NewType->getTypeID() != PointerTyID && "Should not be
refining pointer type!");

to DerivedType::refineAbstractTypeTo(const Type *NewType)

if/because refining pointers makes no sense?


More information about the llvm-dev mailing list