aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/TargetLowering.cpp
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2007-11-05 21:20:28 +0000
committerDale Johannesen <dalej@apple.com>2007-11-05 21:20:28 +0000
commiteb57ea7ea2378b77bc995371c1888193b960cd03 (patch)
treeb09932726b145c3501614679561c699708a4dc48 /lib/CodeGen/SelectionDAG/TargetLowering.cpp
parent14ac17e2dfa9cf66dec0da3618badf87163c9bf9 (diff)
Make labels work in asm blocks; allow labels as
parameters. Rename ValueRefList to ParamList in AsmParser, since its only use is for parameters. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43734 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/TargetLowering.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/TargetLowering.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/lib/CodeGen/SelectionDAG/TargetLowering.cpp
index cffb03da52..9309cf46bd 100644
--- a/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+++ b/lib/CodeGen/SelectionDAG/TargetLowering.cpp
@@ -1396,10 +1396,15 @@ void TargetLowering::LowerAsmOperandForConstraint(SDOperand Op,
SelectionDAG &DAG) {
switch (ConstraintLetter) {
default: break;
+ case 'X': // Allows any operand; labels (basic block) use this.
+ if (Op.getOpcode() == ISD::BasicBlock) {
+ Ops.push_back(Op);
+ return;
+ }
+ // fall through
case 'i': // Simple Integer or Relocatable Constant
case 'n': // Simple Integer
- case 's': // Relocatable Constant
- case 'X': { // Allows any operand.
+ case 's': { // Relocatable Constant
// These operands are interested in values of the form (GV+C), where C may
// be folded in as an offset of GV, or it may be explicitly added. Also, it
// is possible and fine if either GV or C are missing.