In MC asm parsing, account for the possibility of whitespace within

the "identifier" parsed by the frontend callback by skipping forward
until we've consumed a token that ends at the point dictated by the
callback.

In addition, inform the callback when it's parsing an unevaluated
operand (e.g. mov eax, LENGTH A::x) as opposed to an evaluated one
(e.g. mov eax, [A::x]).

This commit depends on a clang commit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@180978 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
John McCall
2013-05-03 00:15:41 +00:00
parent 99ad6ac65e
commit 26f3bb997f
2 changed files with 24 additions and 19 deletions

View File

@@ -49,7 +49,8 @@ public:
virtual ~MCAsmParserSemaCallback();
virtual void *LookupInlineAsmIdentifier(StringRef &LineBuf,
InlineAsmIdentifierInfo &Info) = 0;
InlineAsmIdentifierInfo &Info,
bool IsUnevaluatedContext) = 0;
virtual bool LookupInlineAsmField(StringRef Base, StringRef Member,
unsigned &Offset) = 0;