mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-30 17:25:21 +00:00
Revert "Verifier: Check for incompatible bit piece expressions"
This reverts commit r234698. This caused a use-after-free: `QueuedBitPieceExpressions` holds onto references to `DbgInfoIntrinsic`s and references them past where they're deleted (this is because the verifier is run as a function pass, and then `verifyTypeRefs()` is called during `doFinalization()`). I'll include a reduced crasher for `llc` when I recommit the check. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234717 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -33,6 +33,19 @@
|
||||
using namespace llvm;
|
||||
using namespace llvm::dwarf;
|
||||
|
||||
/// \brief Return the size reported by the variable's type.
|
||||
unsigned DIVariable::getSizeInBits(const DITypeIdentifierMap &Map) {
|
||||
DIType Ty = getType().resolve(Map);
|
||||
// Follow derived types until we reach a type that
|
||||
// reports back a size.
|
||||
while (isa<MDDerivedType>(Ty) && !Ty.getSizeInBits()) {
|
||||
DIDerivedType DT = cast<MDDerivedType>(Ty);
|
||||
Ty = DT.getTypeDerivedFrom().resolve(Map);
|
||||
}
|
||||
assert(Ty.getSizeInBits() && "type with size 0");
|
||||
return Ty.getSizeInBits();
|
||||
}
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
// Simple Descriptor Constructors and other Methods
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
Reference in New Issue
Block a user