OSDN Git Service

[ms-inline asm] Add a MCAsmParserSemaCallback to the TargetAsmParser.
authorChad Rosier <mcrosier@apple.com>
Fri, 19 Oct 2012 20:35:42 +0000 (20:35 +0000)
committerChad Rosier <mcrosier@apple.com>
Fri, 19 Oct 2012 20:35:42 +0000 (20:35 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166308 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/MC/MCTargetAsmParser.h

index a1e5a55..05537f9 100644 (file)
@@ -44,6 +44,10 @@ protected: // Can only create subclasses.
   /// ParsingInlineAsm - Are we parsing ms-style inline assembly?
   bool ParsingInlineAsm;
 
+  /// SemaCallback - The Sema callback implementation.  Must be set when parsing
+  /// ms-style inline assembly.
+  MCAsmParserSemaCallback *SemaCallback;
+
 public:
   virtual ~MCTargetAsmParser();
 
@@ -53,6 +57,10 @@ public:
   bool isParsingInlineAsm () { return ParsingInlineAsm; }
   void setParsingInlineAsm (bool Value) { ParsingInlineAsm = Value; }
 
+  void setSemaCallback(MCAsmParserSemaCallback *Callback) {
+    SemaCallback = Callback;
+  }
+
   virtual bool ParseRegister(unsigned &RegNo, SMLoc &StartLoc,
                              SMLoc &EndLoc) = 0;