diff options
| author | Jim Grosbach <grosbach@apple.com> | 2011-11-01 22:37:37 +0000 | 
|---|---|---|
| committer | Jim Grosbach <grosbach@apple.com> | 2011-11-01 22:37:37 +0000 | 
| commit | 7f1f3bd868ca4a399706bb32f8d689f824d405b9 (patch) | |
| tree | 488c15ceac57b2d91fcf9c2d3246599075464377 /llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp | |
| parent | 6469fc275af601c7666f33ede355d456cc196103 (diff) | |
| download | bcm5719-llvm-7f1f3bd868ca4a399706bb32f8d689f824d405b9.tar.gz bcm5719-llvm-7f1f3bd868ca4a399706bb32f8d689f824d405b9.zip | |
ARM label operands can have an optional '#' before them.
llvm-svn: 143510
Diffstat (limited to 'llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp')
| -rw-r--r-- | llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp | 10 | 
1 files changed, 4 insertions, 6 deletions
| diff --git a/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp b/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp index 46ea29f1927..757eccbb644 100644 --- a/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp +++ b/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp @@ -3835,13 +3835,11 @@ bool ARMAsmParser::parseOperand(SmallVectorImpl<MCParsedAsmOperand*> &Operands,      if (getParser().ParseExpression(ImmVal))        return true;      const MCConstantExpr *CE = dyn_cast<MCConstantExpr>(ImmVal); -    if (!CE) { -      Error(S, "constant expression expected"); -      return MatchOperand_ParseFail; +    if (CE) { +      int32_t Val = CE->getValue(); +      if (isNegative && Val == 0) +        ImmVal = MCConstantExpr::Create(INT32_MIN, getContext());      } -    int32_t Val = CE->getValue(); -    if (isNegative && Val == 0) -      ImmVal = MCConstantExpr::Create(INT32_MIN, getContext());      E = SMLoc::getFromPointer(Parser.getTok().getLoc().getPointer() - 1);      Operands.push_back(ARMOperand::CreateImm(ImmVal, S, E));      return false; | 

