ms-inline-asm: Fix parsing label names inside bracket expressions
authorEhsan Akhgari <ehsan.akhgari@gmail.com>
Mon, 22 Sep 2014 20:40:36 +0000 (20:40 +0000)
committerEhsan Akhgari <ehsan.akhgari@gmail.com>
Mon, 22 Sep 2014 20:40:36 +0000 (20:40 +0000)
commite6f6980d5ba338fb40eb2d294fee878ddf44fd01
tree6cf58f793b0d931dcbd9fdf27425935a29897f75
parentd80fc698f3d7de7458069a7b019d1117fb605dc5
ms-inline-asm: Fix parsing label names inside bracket expressions

Summary:
This fixes a couple of issues.  One is ensuring that AOK_Label rewrite
rules have a lower priority than AOK_Skip rules, as AOK_Skip needs to
be able to skip the brackets properly.  The other part of the fix ensures
that we don't overwrite Identifier when looking up the identifier, and
that we use the locally available information to generate the AOK_Label
rewrite in ParseIntelIdentifier.  Doing that in CreateMemForInlineAsm
would be problematic since the Start location there may point to the
beginning of a bracket expression, and not necessarily the beginning of
an identifier.

This also means that we don't need to carry around the InternlName field,
which helps simplify the code.

Test Plan: This will be tested on the clang side.

Reviewers: rnk

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D5445

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218270 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/MC/MCParser/MCAsmParser.h
include/llvm/MC/MCTargetAsmParser.h
lib/Target/X86/AsmParser/X86AsmParser.cpp