summaryrefslogtreecommitdiffstats
path: root/include/llvm/Target/TargetLowering.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2008-10-17 16:21:11 +0000
committerChris Lattner <sabre@nondot.org>2008-10-17 16:21:11 +0000
commit58f15c482a7129c78ca809792b46befa20ea337d (patch)
tree309dadc5cff02d4f392b98672ebd99dc512a3a5d /include/llvm/Target/TargetLowering.h
parent86af90d802896eff1cd9e9b85a26990c184e0b7c (diff)
downloadexternal_llvm-58f15c482a7129c78ca809792b46befa20ea337d.zip
external_llvm-58f15c482a7129c78ca809792b46befa20ea337d.tar.gz
external_llvm-58f15c482a7129c78ca809792b46befa20ea337d.tar.bz2
add an assert so that PR2356 explodes instead of running off an
array. Improve some minor comments, refactor some helpers in AsmOperandInfo. No functionality change for valid code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57686 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Target/TargetLowering.h')
-rw-r--r--include/llvm/Target/TargetLowering.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/llvm/Target/TargetLowering.h b/include/llvm/Target/TargetLowering.h
index cd75163..da4703c 100644
--- a/include/llvm/Target/TargetLowering.h
+++ b/include/llvm/Target/TargetLowering.h
@@ -1181,6 +1181,8 @@ public:
/// lowering.
struct AsmOperandInfo : public InlineAsm::ConstraintInfo {
/// ConstraintCode - This contains the actual string for the code, like "m".
+ /// TargetLowering picks the 'best' code from ConstraintInfo::Codes that
+ /// most closely matches the operand.
std::string ConstraintCode;
/// ConstraintType - Information about the constraint code, e.g. Register,
@@ -1194,6 +1196,14 @@ public:
/// ConstraintVT - The ValueType for the operand value.
MVT ConstraintVT;
+
+ /// isMatchingConstraint - Return true of this is an input operand that is a
+ /// matching constraint like "4".
+ bool isMatchingConstraint() const;
+
+ /// getMatchedOperand - If this is an input matching constraint, this method
+ /// returns the output operand it matches.
+ unsigned getMatchedOperand() const;
AsmOperandInfo(const InlineAsm::ConstraintInfo &info)
: InlineAsm::ConstraintInfo(info),