summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen/CodeGenInstruction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/utils/TableGen/CodeGenInstruction.cpp')
-rw-r--r--llvm/utils/TableGen/CodeGenInstruction.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/llvm/utils/TableGen/CodeGenInstruction.cpp b/llvm/utils/TableGen/CodeGenInstruction.cpp
index 8fa3050e078..44ee16f6fd7 100644
--- a/llvm/utils/TableGen/CodeGenInstruction.cpp
+++ b/llvm/utils/TableGen/CodeGenInstruction.cpp
@@ -430,6 +430,17 @@ FlattenAsmStringVariants(StringRef Cur, unsigned Variant) {
return Res;
}
+bool CodeGenInstruction::isOperandAPointer(unsigned i) const {
+ if (DagInit *ConstraintList = TheDef->getValueAsDag("InOperandList")) {
+ if (i < ConstraintList->getNumArgs()) {
+ if (DefInit *Constraint = dyn_cast<DefInit>(ConstraintList->getArg(i))) {
+ return Constraint->getDef()->isSubClassOf("TypedOperand") &&
+ Constraint->getDef()->getValueAsBit("IsPointer");
+ }
+ }
+ }
+ return false;
+}
//===----------------------------------------------------------------------===//
/// CodeGenInstAlias Implementation
OpenPOWER on IntegriCloud