mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 12:43:36 +01:00
Add a method to get the bit width of a packed type.
llvm-svn: 31750
This commit is contained in:
parent
6d5a509e34
commit
aea6da0b13
@ -299,8 +299,14 @@ public:
|
||||
///
|
||||
static PackedType *get(const Type *ElementType, unsigned NumElements);
|
||||
|
||||
/// @brief Return the number of elements in the Packed type.
|
||||
inline unsigned getNumElements() const { return NumElements; }
|
||||
|
||||
/// @brief Return the number of bits in the Packed type.
|
||||
inline unsigned getBitWidth() const {
|
||||
return NumElements *getElementType()->getPrimitiveSizeInBits();
|
||||
}
|
||||
|
||||
// Implement the AbstractTypeUser interface.
|
||||
virtual void refineAbstractType(const DerivedType *OldTy, const Type *NewTy);
|
||||
virtual void typeBecameConcrete(const DerivedType *AbsTy);
|
||||
|
Loading…
Reference in New Issue
Block a user