aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
diff options
context:
space:
mode:
authorEric Christopher <echristo@apple.com>2011-06-02 23:16:42 +0000
committerEric Christopher <echristo@apple.com>2011-06-02 23:16:42 +0000
commitde9399bf7656346d25ebbfad7bcbddc8ec1f378e (patch)
tree629ab3e178efe7ecb9d8f31080091bf7e7763454 /llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
parent60cdf8e72712b5e9c48cd7e48d4e42cc5d3e8c9d (diff)
downloadllvm-de9399bf7656346d25ebbfad7bcbddc8ec1f378e.zip
llvm-de9399bf7656346d25ebbfad7bcbddc8ec1f378e.tar.gz
llvm-de9399bf7656346d25ebbfad7bcbddc8ec1f378e.tar.bz2
Have LowerOperandForConstraint handle multiple character constraints.
Part of rdar://9119939 llvm-svn: 132510
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
index bb4df27..06fd55c 100644
--- a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
@@ -2650,9 +2650,13 @@ const char *TargetLowering::LowerXConstraint(EVT ConstraintVT) const{
/// LowerAsmOperandForConstraint - Lower the specified operand into the Ops
/// vector. If it is invalid, don't add anything to Ops.
void TargetLowering::LowerAsmOperandForConstraint(SDValue Op,
- char ConstraintLetter,
+ std::string &Constraint,
std::vector<SDValue> &Ops,
SelectionDAG &DAG) const {
+
+ if (Constraint.length() > 1) return;
+
+ char ConstraintLetter = Constraint[0];
switch (ConstraintLetter) {
default: break;
case 'X': // Allows any operand; labels (basic block) use this.
@@ -3091,7 +3095,7 @@ static void ChooseConstraint(TargetLowering::AsmOperandInfo &OpInfo,
assert(OpInfo.Codes[i].size() == 1 &&
"Unhandled multi-letter 'other' constraint");
std::vector<SDValue> ResultOps;
- TLI.LowerAsmOperandForConstraint(Op, OpInfo.Codes[i][0],
+ TLI.LowerAsmOperandForConstraint(Op, OpInfo.Codes[i],
ResultOps, *DAG);
if (!ResultOps.empty()) {
BestType = CType;