From d48d0784874c3e747508180228743ac2a1b9905a Mon Sep 17 00:00:00 2001 From: Chad Rosier Date: Thu, 18 Oct 2012 20:27:15 +0000 Subject: [PATCH] [ms-inline asm] Add a size argument to the LookupInlineAsmIdentifier() callback, which will be used by the asm matcher in the near future. llvm-svn: 166222 --- llvm/include/llvm/MC/MCParser/MCAsmParser.h | 3 ++- llvm/lib/MC/MCParser/AsmParser.cpp | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/llvm/include/llvm/MC/MCParser/MCAsmParser.h b/llvm/include/llvm/MC/MCParser/MCAsmParser.h index bb71a46..554cdfa 100644 --- a/llvm/include/llvm/MC/MCParser/MCAsmParser.h +++ b/llvm/include/llvm/MC/MCParser/MCAsmParser.h @@ -34,7 +34,8 @@ class Twine; /// MCAsmParserSemaCallback - Generic Sema callback for assembly parser. class MCAsmParserSemaCallback { public: - virtual void *LookupInlineAsmIdentifier(StringRef Name, void *Loc) = 0; + virtual void *LookupInlineAsmIdentifier(StringRef Name, void *Loc, + unsigned &Size) = 0; }; /// MCAsmParser - Generic assembler parser interface, for use by target specific diff --git a/llvm/lib/MC/MCParser/AsmParser.cpp b/llvm/lib/MC/MCParser/AsmParser.cpp index 0e8fe6d..6259c15 100644 --- a/llvm/lib/MC/MCParser/AsmParser.cpp +++ b/llvm/lib/MC/MCParser/AsmParser.cpp @@ -3643,7 +3643,9 @@ bool AsmParser::ParseMSInlineAsm(void *AsmLoc, std::string &AsmString, } // Expr/Input or Output. - void *OpDecl = SI.LookupInlineAsmIdentifier(Operand->getName(), AsmLoc); + unsigned Size; + void *OpDecl = SI.LookupInlineAsmIdentifier(Operand->getName(), AsmLoc, + Size); if (OpDecl) { bool isOutput = (i == 1) && Desc.mayStore(); if (isOutput) { -- 2.7.4