diff options
author | Devang Patel <dpatel@apple.com> | 2009-07-06 23:46:02 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2009-07-06 23:46:02 +0000 |
commit | 446bff93f5d8f3089375dbc0203c00be08009065 (patch) | |
tree | 2f0097685d4b2579604693b4d78a3e16aea3d86f /llvm | |
parent | 5832e7fd23ecb2234827eff9493a52563ac10c88 (diff) | |
download | bcm5719-llvm-446bff93f5d8f3089375dbc0203c00be08009065.tar.gz bcm5719-llvm-446bff93f5d8f3089375dbc0203c00be08009065.zip |
Add isMetadata() to check metadata operand.
llvm-svn: 74883
Diffstat (limited to 'llvm')
-rw-r--r-- | llvm/include/llvm/CodeGen/MachineOperand.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/include/llvm/CodeGen/MachineOperand.h b/llvm/include/llvm/CodeGen/MachineOperand.h index 26ec239f4c8..7d39d973cb3 100644 --- a/llvm/include/llvm/CodeGen/MachineOperand.h +++ b/llvm/include/llvm/CodeGen/MachineOperand.h @@ -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; } |