mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-28 03:25:23 +00:00
Fix Type::isSized() to realize that "{ opaque }" is not sized
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14585 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -206,8 +206,8 @@ public:
|
||||
/// TargetData subsystem to do this.
|
||||
///
|
||||
bool isSized() const {
|
||||
return ID != VoidTyID && ID != TypeTyID &&
|
||||
ID != FunctionTyID && ID != LabelTyID && ID != OpaqueTyID;
|
||||
return (ID >= BoolTyID && ID <= DoubleTyID) || ID == PointerTyID ||
|
||||
isSizedDerivedType();
|
||||
}
|
||||
|
||||
/// getPrimitiveSize - Return the basic size of this type if it is a primative
|
||||
@@ -306,6 +306,11 @@ public:
|
||||
RefCountIsZero();
|
||||
}
|
||||
private:
|
||||
/// isSizedDerivedType - Derived types like structures and arrays are sized
|
||||
/// iff all of the members of the type are sized as well. Since asking for
|
||||
/// their size is relatively uncommon, move this operation out of line.
|
||||
bool isSizedDerivedType() const;
|
||||
|
||||
virtual void RefCountIsZero() const {
|
||||
abort(); // only on derived types!
|
||||
}
|
||||
|
Reference in New Issue
Block a user