[cfe-commits] r93804 - in /cfe/trunk/include/clang: AST/DeclBase.h Basic/Specifiers.h Parse/AccessSpecifier.h Parse/Action.h Parse/Parser.h

John McCall rjmccall at apple.com
Mon Jan 18 15:21:37 PST 2010


Author: rjmccall
Date: Mon Jan 18 17:21:37 2010
New Revision: 93804

URL: http://llvm.org/viewvc/llvm-project?rev=93804&view=rev
Log:
Move AccessSpecifier into the new Specifiers.h;  fixes the layering violations
inherent in, well, pretty much every use of AccessSpecifier.


Removed:
    cfe/trunk/include/clang/Parse/AccessSpecifier.h
Modified:
    cfe/trunk/include/clang/AST/DeclBase.h
    cfe/trunk/include/clang/Basic/Specifiers.h
    cfe/trunk/include/clang/Parse/Action.h
    cfe/trunk/include/clang/Parse/Parser.h

Modified: cfe/trunk/include/clang/AST/DeclBase.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/AST/DeclBase.h?rev=93804&r1=93803&r2=93804&view=diff

==============================================================================
--- cfe/trunk/include/clang/AST/DeclBase.h (original)
+++ cfe/trunk/include/clang/AST/DeclBase.h Mon Jan 18 17:21:37 2010
@@ -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"
 

Modified: cfe/trunk/include/clang/Basic/Specifiers.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/Specifiers.h?rev=93804&r1=93803&r2=93804&view=diff

==============================================================================
--- cfe/trunk/include/clang/Basic/Specifiers.h (original)
+++ cfe/trunk/include/clang/Basic/Specifiers.h Mon Jan 18 17:21:37 2010
@@ -67,6 +67,15 @@
     /*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

Removed: cfe/trunk/include/clang/Parse/AccessSpecifier.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Parse/AccessSpecifier.h?rev=93803&view=auto

==============================================================================
--- cfe/trunk/include/clang/Parse/AccessSpecifier.h (original)
+++ cfe/trunk/include/clang/Parse/AccessSpecifier.h (removed)
@@ -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

Modified: cfe/trunk/include/clang/Parse/Action.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Parse/Action.h?rev=93804&r1=93803&r2=93804&view=diff

==============================================================================
--- cfe/trunk/include/clang/Parse/Action.h (original)
+++ cfe/trunk/include/clang/Parse/Action.h Mon Jan 18 17:21:37 2010
@@ -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"

Modified: cfe/trunk/include/clang/Parse/Parser.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Parse/Parser.h?rev=93804&r1=93803&r2=93804&view=diff

==============================================================================
--- cfe/trunk/include/clang/Parse/Parser.h (original)
+++ cfe/trunk/include/clang/Parse/Parser.h Mon Jan 18 17:21:37 2010
@@ -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"





More information about the cfe-commits mailing list