1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

Add isMetadata() to check metadata operand.

llvm-svn: 74883
This commit is contained in:
Devang Patel 2009-07-06 23:46:02 +00:00
parent 7959284f86
commit 619bba465f

View File

@ -164,6 +164,8 @@ public:
bool isGlobal() const { return OpKind == MO_GlobalAddress; }
/// isSymbol - Tests if this is a MO_ExternalSymbol operand.
bool isSymbol() const { return OpKind == MO_ExternalSymbol; }
/// isMetadata - Tests if this is a MO_Metadata operand.
bool isMetadata() const { return OpKind == MO_Metadata; }
//===--------------------------------------------------------------------===//
// Accessors for Register Operands
@ -325,7 +327,7 @@ public:
}
void setOffset(int64_t Offset) {
assert((isGlobal() || isSymbol() || isCPI()) &&
assert((isGlobal() || isSymbol() || isCPI() || isMetadata()) &&
"Wrong MachineOperand accessor");
Contents.OffsetedInfo.Offset = Offset;
}