diff options
author | John McCall <rjmccall@apple.com> | 2010-08-20 18:27:03 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2010-08-20 18:27:03 +0000 |
commit | 19510856727e0e14a3696b2a72c35163bff2a71f (patch) | |
tree | aa4cb42590b8bf0df7ffb7115c7d74c4a68ef3f2 | |
parent | 033b7b327e8cdc8cd4bafce1625ea88bc9e3f6c8 (diff) |
Another step in the process of making the parser depend on Sema:
- move DeclSpec &c into the Sema library
- move ParseAST into the Parse library
Reflect this change in a thousand different includes.
Reflect this change in the link orders.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@111667 91177308-0d34-0410-b5e6-96231b3b80d8
53 files changed, 115 insertions, 109 deletions
diff --git a/include/clang/Sema/ParseAST.h b/include/clang/Parse/ParseAST.h index 57d7d0637f..0d37e21bec 100644 --- a/include/clang/Sema/ParseAST.h +++ b/include/clang/Parse/ParseAST.h @@ -11,8 +11,8 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_CLANG_SEMA_PARSEAST_H -#define LLVM_CLANG_SEMA_PARSEAST_H +#ifndef LLVM_CLANG_PARSE_PARSEAST_H +#define LLVM_CLANG_PARSE_PARSEAST_H namespace clang { class Preprocessor; diff --git a/include/clang/Parse/Parser.h b/include/clang/Parse/Parser.h index 9a166a1e98..23e7f39bd0 100644 --- a/include/clang/Parse/Parser.h +++ b/include/clang/Parse/Parser.h @@ -16,8 +16,8 @@ #include "clang/Basic/Specifiers.h" #include "clang/Lex/Preprocessor.h" -#include "clang/Parse/Action.h" -#include "clang/Parse/DeclSpec.h" +#include "clang/Sema/Action.h" +#include "clang/Sema/DeclSpec.h" #include "llvm/ADT/OwningPtr.h" #include <stack> #include <list> diff --git a/include/clang/Parse/Action.h b/include/clang/Sema/Action.h index 263dacb43d..8f1772efbe 100644 --- a/include/clang/Parse/Action.h +++ b/include/clang/Sema/Action.h @@ -11,16 +11,16 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_CLANG_PARSE_ACTION_H -#define LLVM_CLANG_PARSE_ACTION_H +#ifndef LLVM_CLANG_SEMA_ACTION_H +#define LLVM_CLANG_SEMA_ACTION_H #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/DeclSpec.h" -#include "clang/Parse/Ownership.h" +#include "clang/Sema/DeclSpec.h" +#include "clang/Sema/Ownership.h" #include "llvm/Support/PrettyStackTrace.h" #include "llvm/ADT/PointerUnion.h" diff --git a/include/clang/Parse/AttributeList.h b/include/clang/Sema/AttributeList.h index e6bf9b6cc6..dcb8d1fd67 100644 --- a/include/clang/Parse/AttributeList.h +++ b/include/clang/Sema/AttributeList.h @@ -1,4 +1,4 @@ -//===--- AttributeList.h ----------------------------------------*- C++ -*-===// +//===--- AttributeList.h - Parsed attribute sets ----------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -7,14 +7,15 @@ // //===----------------------------------------------------------------------===// // -// This file defines the AttributeList class interface. +// This file defines the AttributeList class, which is used to collect +// parsed attributes. // //===----------------------------------------------------------------------===// -#ifndef LLVM_CLANG_ATTRLIST_H -#define LLVM_CLANG_ATTRLIST_H +#ifndef LLVM_CLANG_SEMA_ATTRLIST_H +#define LLVM_CLANG_SEMA_ATTRLIST_H -#include "clang/Parse/Ownership.h" +#include "clang/Sema/Ownership.h" #include "clang/Basic/SourceLocation.h" #include <cassert> diff --git a/include/clang/Parse/DeclSpec.h b/include/clang/Sema/DeclSpec.h index b9fa6503b4..5f70c53f6e 100644 --- a/include/clang/Parse/DeclSpec.h +++ b/include/clang/Sema/DeclSpec.h @@ -1,4 +1,4 @@ -//===--- SemaDeclSpec.h - Declaration Specifier Semantic Analys -*- C++ -*-===// +//===--- DeclSpec.h - Parsed declaration specifiers -------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -7,14 +7,20 @@ // //===----------------------------------------------------------------------===// // -// This file defines interfaces used for Declaration Specifiers and Declarators. +// This file defines the classes used to store parsed information about +// declaration-specifiers and declarators. +// +// static const int volatile x, *y, *(*(*z)[10])(const void *x); +// ------------------------- - -- --------------------------- +// declaration-specifiers \ | / +// declarators // //===----------------------------------------------------------------------===// -#ifndef LLVM_CLANG_PARSE_DECLSPEC_H -#define LLVM_CLANG_PARSE_DECLSPEC_H +#ifndef LLVM_CLANG_SEMA_DECLSPEC_H +#define LLVM_CLANG_SEMA_DECLSPEC_H -#include "clang/Parse/AttributeList.h" +#include "clang/Sema/AttributeList.h" #include "clang/Lex/Token.h" #include "clang/Basic/OperatorKinds.h" #include "clang/Basic/Specifiers.h" diff --git a/include/clang/Parse/Designator.h b/include/clang/Sema/Designator.h index 255af59018..43cfc0b75e 100644 --- a/include/clang/Parse/Designator.h +++ b/include/clang/Sema/Designator.h @@ -12,10 +12,10 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_CLANG_PARSE_DESIGNATOR_H -#define LLVM_CLANG_PARSE_DESIGNATOR_H +#ifndef LLVM_CLANG_SEMA_DESIGNATOR_H +#define LLVM_CLANG_SEMA_DESIGNATOR_H -#include "clang/Parse/Action.h" +#include "clang/Sema/Action.h" namespace clang { diff --git a/include/clang/Sema/IdentifierResolver.h b/include/clang/Sema/IdentifierResolver.h index e494792c54..540d6987d0 100644 --- a/include/clang/Sema/IdentifierResolver.h +++ b/include/clang/Sema/IdentifierResolver.h @@ -16,7 +16,7 @@ #define LLVM_CLANG_AST_SEMA_IDENTIFIERRESOLVER_H #include "clang/Basic/IdentifierTable.h" -#include "clang/Parse/Scope.h" +#include "clang/Sema/Scope.h" #include "clang/AST/Decl.h" #include "clang/AST/DeclarationName.h" #include "clang/AST/DeclCXX.h" diff --git a/include/clang/Sema/Initialization.h b/include/clang/Sema/Initialization.h index 2696960b57..29581ebef3 100644 --- a/include/clang/Sema/Initialization.h +++ b/include/clang/Sema/Initialization.h @@ -13,10 +13,10 @@ #ifndef LLVM_CLANG_SEMA_INITIALIZATION_H #define LLVM_CLANG_SEMA_INITIALIZATION_H +#include "clang/Sema/Action.h" #include "clang/Sema/Overload.h" #include "clang/AST/Type.h" #include "clang/AST/UnresolvedSet.h" -#include "clang/Parse/Action.h" #include "clang/Basic/SourceLocation.h" #include "llvm/ADT/PointerIntPair.h" #include "llvm/ADT/SmallVector.h" diff --git a/include/clang/Parse/Ownership.h b/include/clang/Sema/Ownership.h index 45b8046e1a..b7e69628fa 100644 --- a/include/clang/Parse/Ownership.h +++ b/include/clang/Sema/Ownership.h @@ -1,4 +1,4 @@ -//===--- Ownership.h - Parser Ownership Helpers -----------------*- C++ -*-===// +//===--- Ownership.h - Parser ownership helpers -----------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // @@ -11,8 +11,8 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_CLANG_PARSE_OWNERSHIP_H -#define LLVM_CLANG_PARSE_OWNERSHIP_H +#ifndef LLVM_CLANG_SEMA_OWNERSHIP_H +#define LLVM_CLANG_SEMA_OWNERSHIP_H #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/PointerIntPair.h" diff --git a/include/clang/Parse/Template.h b/include/clang/Sema/ParsedTemplate.h index ba291b0c74..8a3a96136e 100644 --- a/include/clang/Parse/Template.h +++ b/include/clang/Sema/ParsedTemplate.h @@ -1,4 +1,4 @@ -//===--- Template.h - Template Parsing Data Types -------------------------===// +//===--- ParsedTemplate.h - Template Parsing Data Types -------------------===// // // The LLVM Compiler Infrastructure // @@ -11,11 +11,11 @@ // templates. // //===----------------------------------------------------------------------===// -#ifndef LLVM_CLANG_PARSE_TEMPLATE_H -#define LLVM_CLANG_PARSE_TEMPLATE_H +#ifndef LLVM_CLANG_SEMA_PARSEDTEMPLATE_H +#define LLVM_CLANG_SEMA_PARSEDTEMPLATE_H -#include "clang/Parse/DeclSpec.h" -#include "clang/Parse/Ownership.h" +#include "clang/Sema/DeclSpec.h" +#include "clang/Sema/Ownership.h" #include <cassert> namespace clang { diff --git a/include/clang/Parse/Scope.h b/include/clang/Sema/Scope.h index f4f0cb7206..16fe642d24 100644 --- a/include/clang/Parse/Scope.h +++ b/include/clang/Sema/Scope.h @@ -11,10 +11,10 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_CLANG_PARSE_SCOPE_H -#define LLVM_CLANG_PARSE_SCOPE_H +#ifndef LLVM_CLANG_SEMA_SCOPE_H +#define LLVM_CLANG_SEMA_SCOPE_H -#include "clang/Parse/Action.h" +#include "clang/Sema/Action.h" #include "llvm/ADT/SmallPtrSet.h" namespace clang { diff --git a/include/clang/Sema/Sema.h b/include/clang/Sema/Sema.h index 68ca7a17fe..4940216d88 100644 --- a/include/clang/Sema/Sema.h +++ b/include/clang/Sema/Sema.h @@ -15,6 +15,7 @@ #ifndef LLVM_CLANG_AST_SEMA_H #define LLVM_CLANG_AST_SEMA_H +#include "clang/Sema/Action.h" #include "clang/Sema/IdentifierResolver.h" #include "clang/Sema/CodeCompleteConsumer.h" #include "clang/Sema/CXXFieldCollector.h" @@ -28,7 +29,6 @@ #include "clang/AST/DeclTemplate.h" #include "clang/AST/ExprCXX.h" #include "clang/AST/FullExpr.h" -#include "clang/Parse/Action.h" #include "clang/Sema/SemaDiagnostic.h" #include "llvm/ADT/SmallVector.h" #include "llvm/ADT/DenseSet.h" diff --git a/lib/Frontend/DiagChecker.cpp b/lib/Frontend/DiagChecker.cpp index a50cc99ab7..66d7ed7cf4 100644 --- a/lib/Frontend/DiagChecker.cpp +++ b/lib/Frontend/DiagChecker.cpp @@ -13,7 +13,7 @@ #include "clang/Frontend/Utils.h" #include "clang/Frontend/TextDiagnosticBuffer.h" -#include "clang/Sema/ParseAST.h" +#include "clang/Parse/ParseAST.h" #include "clang/AST/ASTConsumer.h" #include "clang/Basic/SourceManager.h" #include "clang/Lex/Preprocessor.h" diff --git a/lib/Frontend/FrontendAction.cpp b/lib/Frontend/FrontendAction.cpp index 531213bf1b..b244c5ce02 100644 --- a/lib/Frontend/FrontendAction.cpp +++ b/lib/Frontend/FrontendAction.cpp @@ -15,7 +15,7 @@ #include "clang/Frontend/ASTUnit.h" #include "clang/Frontend/CompilerInstance.h" #include "clang/Frontend/FrontendDiagnostic.h" -#include "clang/Sema/ParseAST.h" +#include "clang/Parse/ParseAST.h" #include "llvm/Support/MemoryBuffer.h" #include "llvm/Support/Timer.h" #include "llvm/Support/ErrorHandling.h" diff --git a/lib/Parse/CMakeLists.txt b/lib/Parse/CMakeLists.txt index ca62f1558d..cb0c186f5b 100644 --- a/lib/Parse/CMakeLists.txt +++ b/lib/Parse/CMakeLists.txt @@ -1,9 +1,7 @@ set(LLVM_NO_RTTI 1) add_clang_library(clangParse - Action.cpp - AttributeList.cpp - DeclSpec.cpp + ParseAST.cpp ParseCXXInlineMethods.cpp ParseDecl.cpp ParseDeclCXX.cpp diff --git a/lib/Sema/ParseAST.cpp b/lib/Parse/ParseAST.cpp index 8f2f097ec5..0279bb9e06 100644 --- a/lib/Sema/ParseAST.cpp +++ b/lib/Parse/ParseAST.cpp @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#include "clang/Sema/ParseAST.h" +#include "clang/Parse/ParseAST.h" #include "clang/Sema/Sema.h" #include "clang/Sema/CodeCompleteConsumer.h" #include "clang/Sema/SemaConsumer.h" diff --git a/lib/Parse/ParseCXXInlineMethods.cpp b/lib/Parse/ParseCXXInlineMethods.cpp index fbb8a7369d..6b3374db4f 100644 --- a/lib/Parse/ParseCXXInlineMethods.cpp +++ b/lib/Parse/ParseCXXInlineMethods.cpp @@ -13,8 +13,8 @@ #include "clang/Parse/ParseDiagnostic.h" #include "clang/Parse/Parser.h" -#include "clang/Parse/DeclSpec.h" -#include "clang/Parse/Scope.h" +#include "clang/Sema/DeclSpec.h" +#include "clang/Sema/Scope.h" using namespace clang; /// ParseCXXInlineMethodDef - We parsed and verified that the specified diff --git a/lib/Parse/ParseDecl.cpp b/lib/Parse/ParseDecl.cpp index 928c2a9b51..3f976362cd 100644 --- a/lib/Parse/ParseDecl.cpp +++ b/lib/Parse/ParseDecl.cpp @@ -13,8 +13,8 @@ #include "clang/Parse/Parser.h" #include "clang/Parse/ParseDiagnostic.h" -#include "clang/Parse/Scope.h" -#include "clang/Parse/Template.h" +#include "clang/Sema/Scope.h" +#include "clang/Sema/ParsedTemplate.h" #include "RAIIObjectsForParser.h" #include "llvm/ADT/SmallSet.h" using namespace clang; diff --git a/lib/Parse/ParseDeclCXX.cpp b/lib/Parse/ParseDeclCXX.cpp index 5f404ac430..0772450867 100644 --- a/lib/Parse/ParseDeclCXX.cpp +++ b/lib/Parse/ParseDeclCXX.cpp @@ -14,9 +14,9 @@ #include "clang/Basic/OperatorKinds.h" #include "clang/Parse/Parser.h" #include "clang/Parse/ParseDiagnostic.h" -#include "clang/Parse/DeclSpec.h" -#include "clang/Parse/Scope.h" -#include "clang/Parse/Template.h" +#include "clang/Sema/DeclSpec.h" +#include "clang/Sema/Scope.h" +#include "clang/Sema/ParsedTemplate.h" #include "RAIIObjectsForParser.h" using namespace clang; diff --git a/lib/Parse/ParseExpr.cpp b/lib/Parse/ParseExpr.cpp index 844dd3f873..21033b4d19 100644 --- a/lib/Parse/ParseExpr.cpp +++ b/lib/Parse/ParseExpr.cpp @@ -20,9 +20,9 @@ //===----------------------------------------------------------------------===// #include "clang/Parse/Parser.h" -#include "clang/Parse/DeclSpec.h" -#include "clang/Parse/Scope.h" -#include "clang/Parse/Template.h" +#include "clang/Sema/DeclSpec.h" +#include "clang/Sema/Scope.h" +#include "clang/Sema/ParsedTemplate.h" #include "clang/Basic/PrettyStackTrace.h" #include "RAIIObjectsForParser.h" #include "llvm/ADT/SmallVector.h" diff --git a/lib/Parse/ParseExprCXX.cpp b/lib/Parse/ParseExprCXX.cpp index f5ade8a8fb..67b109c833 100644 --- a/lib/Parse/ParseExprCXX.cpp +++ b/lib/Parse/ParseExprCXX.cpp @@ -13,8 +13,8 @@ #include "clang/Parse/ParseDiagnostic.h" #include "clang/Parse/Parser.h" -#include "clang/Parse/DeclSpec.h" -#include "clang/Parse/Template.h" +#include "clang/Sema/DeclSpec.h" +#include "clang/Sema/ParsedTemplate.h" #include "llvm/Support/ErrorHandling.h" using namespace clang; diff --git a/lib/Parse/ParseInit.cpp b/lib/Parse/ParseInit.cpp index 8451aebc04..138058545f 100644 --- a/lib/Parse/ParseInit.cpp +++ b/lib/Parse/ParseInit.cpp @@ -11,10 +11,10 @@ // //===----------------------------------------------------------------------===// -#include "clang/Parse/Designator.h" #include "clang/Parse/Parser.h" #include "clang/Parse/ParseDiagnostic.h" -#include "clang/Parse/Scope.h" +#include "clang/Sema/Designator.h" +#include "clang/Sema/Scope.h" #include "llvm/ADT/SmallString.h" #include "llvm/Support/raw_ostream.h" using namespace clang; diff --git a/lib/Parse/ParseObjc.cpp b/lib/Parse/ParseObjc.cpp index 00df5a2c5a..ddfc7c014a 100644 --- a/lib/Parse/ParseObjc.cpp +++ b/lib/Parse/ParseObjc.cpp @@ -11,10 +11,10 @@ // //===----------------------------------------------------------------------===// -#include "clang/Parse/Parser.h" -#include "clang/Parse/DeclSpec.h" -#include "clang/Parse/Scope.h" #include "clang/Parse/ParseDiagnostic.h" +#include "clang/Parse/Parser.h" +#include "clang/Sema/DeclSpec.h" +#include "clang/Sema/Scope.h" #include "llvm/ADT/SmallVector.h" using namespace clang; diff --git a/lib/Parse/ParsePragma.cpp b/lib/Parse/ParsePragma.cpp index c53b2e4d27..c468869e5b 100644 --- a/lib/Parse/ParsePragma.cpp +++ b/lib/Parse/ParsePragma.cpp @@ -13,9 +13,9 @@ #include "ParsePragma.h" #include "clang/Parse/ParseDiagnostic.h" -#include "clang/Lex/Preprocessor.h" -#include "clang/Parse/Action.h" #include "clang/Parse/Parser.h" +#include "clang/Lex/Preprocessor.h" +#include "clang/Sema/Action.h" using namespace clang; diff --git a/lib/Parse/ParseStmt.cpp b/lib/Parse/ParseStmt.cpp index ccd56e98aa..d4c83a73fb 100644 --- a/lib/Parse/ParseStmt.cpp +++ b/lib/Parse/ParseStmt.cpp @@ -14,8 +14,8 @@ #include "clang/Parse/Parser.h" #include "RAIIObjectsForParser.h" -#include "clang/Parse/DeclSpec.h" -#include "clang/Parse/Scope.h" +#include "clang/Sema/DeclSpec.h" +#include "clang/Sema/Scope.h" #include "clang/Basic/Diagnostic.h" #include "clang/Basic/PrettyStackTrace.h" #include "clang/Basic/SourceManager.h" diff --git a/lib/Parse/ParseTemplate.cpp b/lib/Parse/ParseTemplate.cpp index ccf953d282..a8faee3b43 100644 --- a/lib/Parse/ParseTemplate.cpp +++ b/lib/Parse/ParseTemplate.cpp @@ -13,9 +13,9 @@ #include "clang/Parse/Parser.h" #include "clang/Parse/ParseDiagnostic.h" -#include "clang/Parse/DeclSpec.h" -#include "clang/Parse/Scope.h" -#include "clang/Parse/Template.h" +#include "clang/Sema/DeclSpec.h" +#include "clang/Sema/ParsedTemplate.h" +#include "clang/Sema/Scope.h" #include "RAIIObjectsForParser.h" using namespace clang; diff --git a/lib/Parse/ParseTentative.cpp b/lib/Parse/ParseTentative.cpp index dfd866ff84..dcf1d40628 100644 --- a/lib/Parse/ParseTentative.cpp +++ b/lib/Parse/ParseTentative.cpp @@ -14,7 +14,7 @@ #include "clang/Parse/Parser.h" #include "clang/Parse/ParseDiagnostic.h" -#include "clang/Parse/Template.h" +#include "clang/Sema/ParsedTemplate.h" using namespace clang; /// isCXXDeclarationStatement - C++-specialized function that disambiguates diff --git a/lib/Parse/Parser.cpp b/lib/Parse/Parser.cpp index 4e0ae87234..2864bf28ba 100644 --- a/lib/Parse/Parser.cpp +++ b/lib/Parse/Parser.cpp @@ -13,9 +13,9 @@ #include "clang/Parse/Parser.h" #include "clang/Parse/ParseDiagnostic.h" -#include "clang/Parse/DeclSpec.h" -#include "clang/Parse/Scope.h" -#include "clang/Parse/Template.h" +#include "clang/Sema/DeclSpec.h" +#include "clang/Sema/Scope.h" +#include "clang/Sema/ParsedTemplate.h" #include "llvm/Support/raw_ostream.h" #include "RAIIObjectsForParser.h" #include "ParsePragma.h" diff --git a/lib/Parse/Action.cpp b/lib/Sema/Action.cpp index b34d14f50a..db0779f8b3 100644 --- a/lib/Parse/Action.cpp +++ b/lib/Sema/Action.cpp @@ -11,9 +11,8 @@ // //===----------------------------------------------------------------------===// -#include "clang/Parse/Parser.h" -#include "clang/Parse/DeclSpec.h" -#include "clang/Parse/Scope.h" +#include "clang/Sema/DeclSpec.h" +#include "clang/Sema/Scope.h" #include "clang/Basic/TargetInfo.h" #include "llvm/Support/Allocator.h" #include "llvm/Support/RecyclingAllocator.h" diff --git a/lib/Parse/AttributeList.cpp b/lib/Sema/AttributeList.cpp index 8263923fe2..cf99227a8d 100644 --- a/lib/Parse/AttributeList.cpp +++ b/lib/Sema/AttributeList.cpp @@ -11,7 +11,7 @@ // //===----------------------------------------------------------------------===// -#include "clang/Parse/AttributeList.h" |