Move AccessSpecifier into the new Specifiers.h; fixes the layering violations

inherent in, well, pretty much every use of AccessSpecifier.

llvm-svn: 93804
This commit is contained in:
John McCall 2010-01-18 23:21:37 +00:00
parent 42ffdb32fb
commit 62e2066792
5 changed files with 12 additions and 34 deletions

View 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"

View 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

View File

@ -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

View 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"

View 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"