[llvm-branch-commits] [llvm-branch] r120651 - /llvm/branches/Apple/whitney/lib/Target/X86/AsmParser/X86AsmParser.cpp

Daniel Dunbar daniel at zuster.org
Wed Dec 1 18:51:33 PST 2010


Author: ddunbar
Date: Wed Dec  1 20:51:33 2010
New Revision: 120651

URL: http://llvm.org/viewvc/llvm-project?rev=120651&view=rev
Log:
Merge r119676:
--
Author: Chris Lattner <clattner at apple.com>
Date:   Thu Nov 18 02:53:02 2010 +0000

    trivial QoI improvement.  On this invalid input:
      sahf	movl	344(%rdi),%r14d
    we used to produce:

    t.s:2:1: error: unexpected token in argument list

    ^

    we now produce:
    t.s:1:11: error: unexpected token in argument list
    sahf	movl	344(%rdi),%r14d
        	    	^

    rdar://8581401

Modified:
    llvm/branches/Apple/whitney/lib/Target/X86/AsmParser/X86AsmParser.cpp

Modified: llvm/branches/Apple/whitney/lib/Target/X86/AsmParser/X86AsmParser.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/whitney/lib/Target/X86/AsmParser/X86AsmParser.cpp?rev=120651&r1=120650&r2=120651&view=diff
==============================================================================
--- llvm/branches/Apple/whitney/lib/Target/X86/AsmParser/X86AsmParser.cpp (original)
+++ llvm/branches/Apple/whitney/lib/Target/X86/AsmParser/X86AsmParser.cpp Wed Dec  1 20:51:33 2010
@@ -744,8 +744,9 @@
     }
 
     if (getLexer().isNot(AsmToken::EndOfStatement)) {
+      SMLoc Loc = getLexer().getLoc();
       Parser.EatToEndOfStatement();
-      return TokError("unexpected token in argument list");
+      return Error(Loc, "unexpected token in argument list");
     }
   }
 





More information about the llvm-branch-commits mailing list