aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/CodeGen/MachineOperand.h
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2009-07-06 23:46:02 +0000
committerDevang Patel <dpatel@apple.com>2009-07-06 23:46:02 +0000
commitf4c240d81e00f59523e814b47b89c2a0fd8f636a (patch)
tree29022483d555353c11d9225ee2edaa9f3465361c /include/llvm/CodeGen/MachineOperand.h
parent27ac9824b890f50b95972bf4bf33bce5300c8d7b (diff)
downloadexternal_llvm-f4c240d81e00f59523e814b47b89c2a0fd8f636a.tar.gz
external_llvm-f4c240d81e00f59523e814b47b89c2a0fd8f636a.tar.bz2
external_llvm-f4c240d81e00f59523e814b47b89c2a0fd8f636a.zip
Add isMetadata() to check metadata operand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74883 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/MachineOperand.h')
-rw-r--r--include/llvm/CodeGen/MachineOperand.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/llvm/CodeGen/MachineOperand.h b/include/llvm/CodeGen/MachineOperand.h
index 26ec239f4c..7d39d973cb 100644
--- a/include/llvm/CodeGen/MachineOperand.h
+++ b/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;
}