[ms-inline asm] Have the LookupInlineAsmIdentifier() callback function return a

*NamedDecl.  In turn, build the expressions after we're finished parsing the
asm.  This avoids a crasher if the lookup fails.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166212 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chad Rosier
2012-10-18 19:39:30 +00:00
parent 8c1dcdf26d
commit c8dd27e583
2 changed files with 15 additions and 28 deletions

View File

@@ -34,8 +34,7 @@ class Twine;
/// MCAsmParserSemaCallback - Generic Sema callback for assembly parser.
class MCAsmParserSemaCallback {
public:
virtual void *LookupInlineAsmIdentifier(StringRef Name, void *Loc,
void **IdentifierInfoPtr) = 0;
virtual void *LookupInlineAsmIdentifier(StringRef Name, void *Loc) = 0;
};
/// MCAsmParser - Generic assembler parser interface, for use by target specific
@@ -89,9 +88,8 @@ public:
/// ParseMSInlineAsm - Parse ms-style inline assembly.
virtual bool ParseMSInlineAsm(void *AsmLoc, std::string &AsmString,
unsigned &NumOutputs, unsigned &NumInputs,
SmallVectorImpl<void *> &Names,
SmallVectorImpl<void *> &OpDecls,
SmallVectorImpl<std::string> &Constraints,
SmallVectorImpl<void *> &Exprs,
SmallVectorImpl<std::string> &Clobbers,
const MCInstrInfo *MII,
const MCInstPrinter *IP,