[ms-inline asm] Add a size argument to the LookupInlineAsmIdentifier() callback,
authorChad Rosier <mcrosier@apple.com>
Thu, 18 Oct 2012 20:27:15 +0000 (20:27 +0000)
committerChad Rosier <mcrosier@apple.com>
Thu, 18 Oct 2012 20:27:15 +0000 (20:27 +0000)
which will be used by the asm matcher in the near future.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166222 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/MC/MCParser/MCAsmParser.h
lib/MC/MCParser/AsmParser.cpp

index bb71a4633db1417eeef9630b5b63eefe54fdc527..554cdfabf6bf1d6f4872bd0c0b6006e94f143fc8 100644 (file)
@@ -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
index 0e8fe6d5e94530054df4028a5ccad0b9e4b5ebd3..6259c15c206ae95d1160139cb72b638905ca5094 100644 (file)
@@ -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) {