mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-02 07:11:49 +00:00
* Make assertion message useful
* Kill dead conditional git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6544 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1bafd29e0e
commit
b84388937c
@ -225,7 +225,8 @@ ConstantStruct::ConstantStruct(const StructType *T,
|
||||
"Invalid initializer vector for constant structure");
|
||||
Operands.reserve(V.size());
|
||||
for (unsigned i = 0, e = V.size(); i != e; ++i) {
|
||||
assert(V[i]->getType() == ETypes[i]);
|
||||
assert(V[i]->getType() == ETypes[i] &&
|
||||
"Initializer for struct element doesn't match struct element type!");
|
||||
Operands.push_back(Use(V[i], this));
|
||||
}
|
||||
}
|
||||
@ -671,12 +672,10 @@ void ConstantPointerNull::refineAbstractType(const DerivedType *OldTy,
|
||||
if (OldTy == NewTy) return;
|
||||
|
||||
// Make everyone now use a constant of the new type...
|
||||
if (NewTy != OldTy) {
|
||||
replaceAllUsesWith(ConstantPointerNull::get(cast<PointerType>(NewTy)));
|
||||
replaceAllUsesWith(ConstantPointerNull::get(cast<PointerType>(NewTy)));
|
||||
|
||||
// This constant is now dead, destroy it.
|
||||
destroyConstant();
|
||||
}
|
||||
// This constant is now dead, destroy it.
|
||||
destroyConstant();
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user