[ms-inline asm] Add support for calling functions from inline assembly.

Part of rdar://12991541

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@172121 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chad Rosier
2013-01-10 22:10:27 +00:00
parent 48fdf9b379
commit c1ec207b61
5 changed files with 66 additions and 18 deletions

View File

@@ -36,7 +36,7 @@ class MCAsmParserSemaCallback {
public:
virtual ~MCAsmParserSemaCallback();
virtual void *LookupInlineAsmIdentifier(StringRef Name, void *Loc,
unsigned &Size) = 0;
unsigned &Size, bool &IsVarDecl) = 0;
virtual bool LookupInlineAsmField(StringRef Base, StringRef Member,
unsigned &Offset) = 0;
};

View File

@@ -70,6 +70,10 @@ public:
/// care of the rewrites. Only valid when parsing MS-style inline assembly.
virtual bool needAsmRewrite() const { return true; }
/// needAddressOf - Do we need to emit code to get the address of the
/// variable/label? Only valid when parsing MS-style inline assembly.
virtual bool needAddressOf() const { return false; }
/// isOffsetOf - Do we need to emit code to get the offset of the variable,
/// rather then the value of the variable? Only valid when parsing MS-style
/// inline assembly.