diff options
author | John McCall <rjmccall@apple.com> | 2010-01-18 23:21:37 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-01-18 23:21:37 +0000 |
commit | ad2b804faf29042e6c4e331d0987f103f1e2fd31 (patch) | |
tree | 9627c85b1c09e013345bdf2f57f498b630a912ab | |
parent | 83b7b31fff0b3b0d6519676c5738b61058202d88 (diff) |
Move AccessSpecifier into the new Specifiers.h; fixes the layering violations
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
-rw-r--r-- | include/clang/AST/DeclBase.h | 3 | ||||
-rw-r--r-- | include/clang/Basic/Specifiers.h | 9 | ||||
-rw-r--r-- | include/clang/Parse/AccessSpecifier.h | 30 | ||||
-rw-r--r-- | include/clang/Parse/Action.h | 2 | ||||
-rw-r--r-- | include/clang/Parse/Parser.h | 2 |
5 files changed, 12 insertions, 34 deletions
diff --git a/include/clang/AST/DeclBase.h b/include/clang/AST/DeclBase.h index 0902b450a4..775bce2a15 100644 --- a/include/clang/AST/DeclBase.h +++ b/include/clang/AST/DeclBase.h @@ -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" diff --git a/include/clang/Basic/Specifiers.h b/include/clang/Basic/Specifiers.h index 5f00a46d8b..88e4396593 100644 --- a/include/clang/Basic/Specifiers.h +++ b/include/clang/Basic/Specifiers.h @@ -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 index 8d2cee8ea4..0000000000 --- a/include/clang/Parse/AccessSpecifier.h +++ /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 diff --git a/include/clang/Parse/Action.h b/include/clang/Parse/Action.h index 4b9ff7be0d..ff33f5039d 100644 --- a/include/clang/Parse/Action.h +++ b/include/clang/Parse/Action.h @@ -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" diff --git a/include/clang/Parse/Parser.h b/include/clang/Parse/Parser.h index 0fc9413c30..e7cb0a2493 100644 --- a/include/clang/Parse/Parser.h +++ b/include/clang/Parse/Parser.h @@ -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" |