Fix a problem in the code where ARMAsmParser::ParseShift() second argument
authorKevin Enderby <enderby@apple.com>
Mon, 12 Oct 2009 22:39:54 +0000 (22:39 +0000)
committerKevin Enderby <enderby@apple.com>
Mon, 12 Oct 2009 22:39:54 +0000 (22:39 +0000)
should have been a pointer to a reference.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83915 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Target/ARM/AsmParser/ARMAsmParser.cpp

index f64b62b2792b999a22f369d1f634b2ceceda0d57..1f0ab9b0b05b0a96737ccb5ab72859a0d5378acb 100644 (file)
@@ -50,7 +50,7 @@ private:
 
   bool ParseMemory(ARMOperand &Op);
 
-  bool ParseShift(enum ShiftType *St, const MCExpr *ShiftAmount);
+  bool ParseShift(enum ShiftType *St, const MCExpr *&ShiftAmount);
 
   bool ParseOperand(ARMOperand &Op);
 
@@ -414,7 +414,7 @@ bool ARMAsmParser::ParseMemory(ARMOperand &Op) {
 ///   ( lsl | lsr | asr | ror ) , # shift_amount
 ///   rrx
 /// and returns true if it parses a shift otherwise it returns false.
-bool ARMAsmParser::ParseShift(ShiftType *St, const MCExpr *ShiftAmount) {
+bool ARMAsmParser::ParseShift(ShiftType *St, const MCExpr *&ShiftAmount) {
   const AsmToken &Tok = getLexer().getTok();
   if (Tok.isNot(AsmToken::Identifier))
     return true;