]> granicus.if.org Git - clang/commitdiff
Move AccessSpecifier into the new Specifiers.h; fixes the layering violations
authorJohn McCall <rjmccall@apple.com>
Mon, 18 Jan 2010 23:21:37 +0000 (23:21 +0000)
committerJohn McCall <rjmccall@apple.com>
Mon, 18 Jan 2010 23:21:37 +0000 (23:21 +0000)
inherent in, well, pretty much every use of AccessSpecifier.

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

include/clang/AST/DeclBase.h
include/clang/Basic/Specifiers.h
include/clang/Parse/AccessSpecifier.h [deleted file]
include/clang/Parse/Action.h
include/clang/Parse/Parser.h

index 0902b450a4acaecc26eb7ca9a224d94fd5eb6cef..775bce2a15fc7a79297313909de4b1a053220964 100644 (file)
@@ -16,8 +16,7 @@
 
 #include "clang/AST/Attr.h"
 #include "clang/AST/Type.h"
-// FIXME: Layering violation
-#include "clang/Parse/AccessSpecifier.h"
+#include "clang/Basic/Specifiers.h"
 #include "llvm/Support/PrettyStackTrace.h"
 #include "llvm/ADT/PointerUnion.h"
 
index 5f00a46d8b9490cc6344f5a7cc1695024bbc465c..88e439659372e9e379d8f719edcaaa92f083238b 100644 (file)
@@ -67,6 +67,15 @@ namespace clang {
     /*DeclSpec::TSW*/ unsigned Width : 2;
     bool ModeAttr : 1;
   };  
+
+  /// AccessSpecifier - A C++ access specifier (none, public, private,
+  /// protected).
+  enum AccessSpecifier {
+    AS_none,
+    AS_public,
+    AS_protected,
+    AS_private
+  };
 }
 
 #endif // LLVM_CLANG_BASIC_SPECIFIERS_H
diff --git a/include/clang/Parse/AccessSpecifier.h b/include/clang/Parse/AccessSpecifier.h
deleted file mode 100644 (file)
index 8d2cee8..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-//===--- AccessSpecifier.h - C++ Access Specifiers -*- C++ -*-===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-//
-// This file defines interfaces used for C++ access specifiers.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_CLANG_PARSE_ACCESS_SPECIFIER_H
-#define LLVM_CLANG_PARSE_ACCESS_SPECIFIER_H
-
-namespace clang {
-
-/// AccessSpecifier - A C++ access specifier (none, public, private,
-/// protected).
-enum AccessSpecifier {
-  AS_none,
-  AS_public,
-  AS_protected,
-  AS_private
-};
-
-} // end namespace clang
-
-#endif
index 4b9ff7be0d80a334f3ba474faa7f71b9be061eb9..ff33f5039d5d7d6fe45d494b3685afbc738a14a7 100644 (file)
@@ -16,9 +16,9 @@
 
 #include "clang/Basic/IdentifierTable.h"
 #include "clang/Basic/SourceLocation.h"
+#include "clang/Basic/Specifiers.h"
 #include "clang/Basic/TemplateKinds.h"
 #include "clang/Basic/TypeTraits.h"
-#include "clang/Parse/AccessSpecifier.h"
 #include "clang/Parse/DeclSpec.h"
 #include "clang/Parse/Ownership.h"
 #include "llvm/Support/PrettyStackTrace.h"
index 0fc9413c30c3eee0f087844a3900d0dc1bd569ef..e7cb0a2493d30b09c1f630143b5421b6c4000604 100644 (file)
@@ -14,8 +14,8 @@
 #ifndef LLVM_CLANG_PARSE_PARSER_H
 #define LLVM_CLANG_PARSE_PARSER_H
 
+#include "clang/Basic/Specifiers.h"
 #include "clang/Lex/Preprocessor.h"
-#include "clang/Parse/AccessSpecifier.h"
 #include "clang/Parse/Action.h"
 #include "clang/Parse/DeclSpec.h"
 #include "llvm/ADT/OwningPtr.h"