[llvm] r210417 - Make InlineAsmIdentifierInfo forward-declarable

Alp Toker alp at nuanti.com
Sat Jun 7 22:07:38 PDT 2014


Author: alp
Date: Sun Jun  8 00:07:38 2014
New Revision: 210417

URL: http://llvm.org/viewvc/llvm-project?rev=210417&view=rev
Log:
Make InlineAsmIdentifierInfo forward-declarable

This helps localize header inclusion in the frontend.

Modified:
    llvm/trunk/include/llvm/MC/MCParser/MCAsmParser.h

Modified: llvm/trunk/include/llvm/MC/MCParser/MCAsmParser.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/MC/MCParser/MCAsmParser.h?rev=210417&r1=210416&r2=210417&view=diff
==============================================================================
--- llvm/trunk/include/llvm/MC/MCParser/MCAsmParser.h (original)
+++ llvm/trunk/include/llvm/MC/MCParser/MCAsmParser.h Sun Jun  8 00:07:38 2014
@@ -30,22 +30,25 @@ class SMRange;
 class SourceMgr;
 class Twine;
 
+class InlineAsmIdentifierInfo {
+public:
+  void *OpDecl;
+  bool IsVarDecl;
+  unsigned Length, Size, Type;
+
+  void clear() {
+    OpDecl = nullptr;
+    IsVarDecl = false;
+    Length = 1;
+    Size = 0;
+    Type = 0;
+  }
+};
+
 /// MCAsmParserSemaCallback - Generic Sema callback for assembly parser.
 class MCAsmParserSemaCallback {
 public:
-  typedef struct {
-    void *OpDecl;
-    bool IsVarDecl;
-    unsigned Length, Size, Type;
-
-    void clear() {
-      OpDecl = nullptr;
-      IsVarDecl = false;
-      Length = 1;
-      Size = 0;
-      Type = 0;
-    }
-  } InlineAsmIdentifierInfo;
+  typedef llvm::InlineAsmIdentifierInfo InlineAsmIdentifierInfo;
 
   virtual ~MCAsmParserSemaCallback();
   virtual void *LookupInlineAsmIdentifier(StringRef &LineBuf,
@@ -56,9 +59,6 @@ public:
                                     unsigned &Offset) = 0;
 };
 
-typedef MCAsmParserSemaCallback::InlineAsmIdentifierInfo
-  InlineAsmIdentifierInfo;
-
 /// MCAsmParser - Generic assembler parser interface, for use by target specific
 /// assembly parsers.
 class MCAsmParser {





More information about the llvm-commits mailing list