mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-21 18:24:23 +00:00
DebugInfo: Move DIExpression bit-piece API to MDExpression
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234286 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -445,6 +445,24 @@ bool MDExpression::isValid() const {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool MDExpression::isBitPiece() const {
|
||||
assert(isValid() && "Expected valid expression");
|
||||
if (unsigned N = getNumElements())
|
||||
if (N >= 3)
|
||||
return getElement(N - 3) == dwarf::DW_OP_bit_piece;
|
||||
return false;
|
||||
}
|
||||
|
||||
uint64_t MDExpression::getBitPieceOffset() const {
|
||||
assert(isBitPiece() && "Expected bit piece");
|
||||
return getElement(getNumElements() - 2);
|
||||
}
|
||||
|
||||
uint64_t MDExpression::getBitPieceSize() const {
|
||||
assert(isBitPiece() && "Expected bit piece");
|
||||
return getElement(getNumElements() - 1);
|
||||
}
|
||||
|
||||
MDObjCProperty *MDObjCProperty::getImpl(
|
||||
LLVMContext &Context, MDString *Name, Metadata *File, unsigned Line,
|
||||
MDString *GetterName, MDString *SetterName, unsigned Attributes,
|
||||
|
Reference in New Issue
Block a user