This is an archive of the discontinued LLVM Phabricator instance.

ms-inline-asm: Fix parsing label names inside bracket expressions
ClosedPublic

Authored by ehsan on Sep 22 2014, 12:50 PM.

Details

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.

Diff Detail

Event Timeline

ehsan updated this revision to Diff 13949.Sep 22 2014, 12:50 PM
ehsan retitled this revision from to ms-inline-asm: Fix parsing label names inside bracket expressions.
ehsan updated this object.
ehsan edited the test plan for this revision. (Show Details)
ehsan added a reviewer: rnk.
ehsan added a subscriber: Unknown Object (MLST).
rnk accepted this revision.Sep 22 2014, 1:48 PM
rnk edited edge metadata.

lgtm

lib/Target/X86/AsmParser/X86AsmParser.cpp
1344

80cols

This revision is now accepted and ready to land.Sep 22 2014, 1:48 PM
ehsan closed this revision.Sep 22 2014, 1:50 PM
ehsan updated this revision to Diff 13957.

Closed by commit rL218270 (authored by @ehsan).