mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-10 05:41:40 +00:00
VMCore: add assert for miscompile
See PR11652. Trying to add this assert to setSubclassData() itself actually prevented the miscompile entirely, so it has to be here. This makes the source of the bug more obvious than the other asserts triggering later on did. llvm-svn: 147390
This commit is contained in:
parent
4ed60a4736
commit
06b6c587e8
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user