diff options
-rw-r--r-- | lib/VMCore/Type.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/VMCore/Type.cpp b/lib/VMCore/Type.cpp index f4fad667a1..d19dc06caa 100644 --- a/lib/VMCore/Type.cpp +++ b/lib/VMCore/Type.cpp @@ -707,7 +707,12 @@ PointerType *PointerType::get(Type *EltTy, unsigned AddressSpace) { PointerType::PointerType(Type *E, unsigned AddrSpace) : SequentialType(PointerTyID, E) { +#ifndef NDEBUG + const unsigned oldNCT = NumContainedTys; +#endif setSubclassData(AddrSpace); + // Check for miscompile. PR11652. + assert(oldNCT == NumContainedTys && "bitfield written out of bounds?"); } PointerType *Type::getPointerTo(unsigned addrs) { |