From: Chris Lattner Date: Sun, 7 Oct 2007 08:58:51 +0000 (+0000) Subject: move IdentifierTable.h from liblex to libbasic. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c7229c338c21ef26b01ef3ecf9eec4fd373fa9ec;p=clang move IdentifierTable.h from liblex to libbasic. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42730 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/AST/ASTContext.cpp b/AST/ASTContext.cpp index 6039131899..48068688b7 100644 --- a/AST/ASTContext.cpp +++ b/AST/ASTContext.cpp @@ -17,7 +17,6 @@ #include "clang/Lex/Preprocessor.h" #include "clang/Basic/TargetInfo.h" #include "llvm/ADT/SmallVector.h" -#include "clang/Lex/IdentifierTable.h" using namespace clang; enum FloatingRank { diff --git a/AST/Builtins.cpp b/AST/Builtins.cpp index 408e28d229..a848028612 100644 --- a/AST/Builtins.cpp +++ b/AST/Builtins.cpp @@ -13,7 +13,7 @@ #include "clang/AST/Builtins.h" #include "clang/AST/ASTContext.h" -#include "clang/Lex/IdentifierTable.h" +#include "clang/Basic/IdentifierTable.h" #include "clang/Basic/TargetInfo.h" using namespace clang; diff --git a/AST/Decl.cpp b/AST/Decl.cpp index da7aab9bcc..e629e9c26e 100644 --- a/AST/Decl.cpp +++ b/AST/Decl.cpp @@ -13,7 +13,7 @@ #include "clang/AST/Decl.h" #include "clang/AST/DeclObjC.h" -#include "clang/Lex/IdentifierTable.h" +#include "clang/Basic/IdentifierTable.h" using namespace clang; // temporary statistics gathering diff --git a/AST/Expr.cpp b/AST/Expr.cpp index 40a95c0276..ac8df82aec 100644 --- a/AST/Expr.cpp +++ b/AST/Expr.cpp @@ -14,7 +14,7 @@ #include "clang/AST/Expr.h" #include "clang/AST/ASTContext.h" #include "clang/AST/StmtVisitor.h" -#include "clang/Lex/IdentifierTable.h" +#include "clang/Basic/IdentifierTable.h" using namespace clang; //===----------------------------------------------------------------------===// diff --git a/AST/Stmt.cpp b/AST/Stmt.cpp index 0f2bb70416..6768705cee 100644 --- a/AST/Stmt.cpp +++ b/AST/Stmt.cpp @@ -14,7 +14,7 @@ #include "clang/AST/Stmt.h" #include "clang/AST/ExprCXX.h" #include "clang/AST/StmtVisitor.h" -#include "clang/Lex/IdentifierTable.h" +#include "clang/Basic/IdentifierTable.h" using namespace clang; static struct StmtClassNameTable { diff --git a/AST/StmtDumper.cpp b/AST/StmtDumper.cpp index 6f25e129a3..6476074e97 100644 --- a/AST/StmtDumper.cpp +++ b/AST/StmtDumper.cpp @@ -15,7 +15,7 @@ #include "clang/AST/StmtVisitor.h" #include "clang/AST/Decl.h" #include "clang/AST/ExprCXX.h" -#include "clang/Lex/IdentifierTable.h" +#include "clang/Basic/IdentifierTable.h" #include "clang/Basic/SourceManager.h" #include "llvm/Support/Compiler.h" #include diff --git a/AST/StmtPrinter.cpp b/AST/StmtPrinter.cpp index a25d8eee4a..15582547c2 100644 --- a/AST/StmtPrinter.cpp +++ b/AST/StmtPrinter.cpp @@ -16,7 +16,7 @@ #include "clang/AST/Decl.h" #include "clang/AST/ExprCXX.h" #include "clang/AST/PrettyPrinter.h" -#include "clang/Lex/IdentifierTable.h" +#include "clang/Basic/IdentifierTable.h" #include "llvm/Support/Compiler.h" #include #include diff --git a/AST/Type.cpp b/AST/Type.cpp index 39646b7529..de840cf970 100644 --- a/AST/Type.cpp +++ b/AST/Type.cpp @@ -11,11 +11,11 @@ // //===----------------------------------------------------------------------===// -#include "clang/Lex/IdentifierTable.h" #include "clang/AST/Type.h" #include "clang/AST/Decl.h" #include "clang/AST/DeclObjC.h" #include "clang/AST/Expr.h" +#include "clang/Basic/IdentifierTable.h" #include "clang/Basic/TargetInfo.h" #include "llvm/Support/Streams.h" #include "llvm/ADT/StringExtras.h" diff --git a/Analysis/LiveVariables.cpp b/Analysis/LiveVariables.cpp index b4220ef9bd..f37239a6a6 100644 --- a/Analysis/LiveVariables.cpp +++ b/Analysis/LiveVariables.cpp @@ -18,7 +18,6 @@ #include "clang/AST/CFG.h" #include "clang/Analysis/Visitors/CFGRecStmtDeclVisitor.h" #include "clang/Analysis/FlowSensitive/DataflowSolver.h" -#include "clang/Lex/IdentifierTable.h" #include "llvm/ADT/SmallPtrSet.h" #include diff --git a/Lex/IdentifierTable.cpp b/Basic/IdentifierTable.cpp similarity index 99% rename from Lex/IdentifierTable.cpp rename to Basic/IdentifierTable.cpp index c4c1ee358d..51abcd22b5 100644 --- a/Lex/IdentifierTable.cpp +++ b/Basic/IdentifierTable.cpp @@ -12,7 +12,7 @@ // //===----------------------------------------------------------------------===// -#include "clang/Lex/IdentifierTable.h" +#include "clang/Basic/IdentifierTable.h" #include "clang/Basic/LangOptions.h" #include "llvm/ADT/FoldingSet.h" #include "llvm/ADT/DenseMap.h" diff --git a/CodeGen/CGExpr.cpp b/CodeGen/CGExpr.cpp index d896c95097..7fbd1f17aa 100644 --- a/CodeGen/CGExpr.cpp +++ b/CodeGen/CGExpr.cpp @@ -14,7 +14,6 @@ #include "CodeGenFunction.h" #include "CodeGenModule.h" #include "clang/AST/AST.h" -#include "clang/Lex/IdentifierTable.h" #include "llvm/Constants.h" #include "llvm/DerivedTypes.h" #include "llvm/Function.h" diff --git a/Driver/PrintParserCallbacks.cpp b/Driver/PrintParserCallbacks.cpp index 0ed922371f..e3bfdf57f1 100644 --- a/Driver/PrintParserCallbacks.cpp +++ b/Driver/PrintParserCallbacks.cpp @@ -13,7 +13,6 @@ //===----------------------------------------------------------------------===// #include "clang.h" -#include "clang/Lex/IdentifierTable.h" #include "clang/Parse/Action.h" #include "clang/Parse/DeclSpec.h" #include diff --git a/Lex/HeaderSearch.cpp b/Lex/HeaderSearch.cpp index 00a36eef63..719b9fb9c6 100644 --- a/Lex/HeaderSearch.cpp +++ b/Lex/HeaderSearch.cpp @@ -11,9 +11,9 @@ // //===----------------------------------------------------------------------===// -#include "clang/Basic/FileManager.h" #include "clang/Lex/HeaderSearch.h" -#include "clang/Lex/IdentifierTable.h" +#include "clang/Basic/FileManager.h" +#include "clang/Basic/IdentifierTable.h" #include "llvm/System/Path.h" #include "llvm/ADT/SmallString.h" using namespace clang; diff --git a/Parse/AttributeList.cpp b/Parse/AttributeList.cpp index 385dc03490..7be529f4e5 100644 --- a/Parse/AttributeList.cpp +++ b/Parse/AttributeList.cpp @@ -12,7 +12,6 @@ //===----------------------------------------------------------------------===// #include "clang/Parse/AttributeList.h" -#include "clang/Lex/IdentifierTable.h" using namespace clang; AttributeList::AttributeList(IdentifierInfo *aName, SourceLocation aLoc, diff --git a/Sema/SemaDecl.cpp b/Sema/SemaDecl.cpp index d870ab4d21..0b812cdd48 100644 --- a/Sema/SemaDecl.cpp +++ b/Sema/SemaDecl.cpp @@ -20,7 +20,6 @@ #include "clang/AST/Type.h" #include "clang/Parse/DeclSpec.h" #include "clang/Parse/Scope.h" -#include "clang/Lex/IdentifierTable.h" #include "clang/Basic/LangOptions.h" #include "clang/Basic/TargetInfo.h" #include "llvm/ADT/SmallString.h" diff --git a/Sema/SemaStmt.cpp b/Sema/SemaStmt.cpp index 653a0ab5b9..b6d4c5580d 100644 --- a/Sema/SemaStmt.cpp +++ b/Sema/SemaStmt.cpp @@ -18,7 +18,6 @@ #include "clang/Parse/Scope.h" #include "clang/Basic/Diagnostic.h" #include "clang/Basic/LangOptions.h" -#include "clang/Lex/IdentifierTable.h" using namespace clang; Sema::StmtResult Sema::ActOnExprStmt(ExprTy *expr) { diff --git a/Sema/SemaType.cpp b/Sema/SemaType.cpp index 1b61faa53e..180e440f04 100644 --- a/Sema/SemaType.cpp +++ b/Sema/SemaType.cpp @@ -16,7 +16,6 @@ #include "clang/AST/Decl.h" #include "clang/AST/DeclObjC.h" #include "clang/Parse/DeclSpec.h" -#include "clang/Lex/IdentifierTable.h" #include "clang/Basic/LangOptions.h" using namespace clang; diff --git a/clang.xcodeproj/project.pbxproj b/clang.xcodeproj/project.pbxproj index 4ca31d8b25..6ca61e7594 100644 --- a/clang.xcodeproj/project.pbxproj +++ b/clang.xcodeproj/project.pbxproj @@ -53,6 +53,8 @@ DE3464220B03040900DBC861 /* Type.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE3464210B03040900DBC861 /* Type.h */; }; DE3985790CB8ADC800223765 /* ASTConsumers.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE3985780CB8ADC800223765 /* ASTConsumers.h */; }; DE39857B0CB8ADCB00223765 /* ASTConsumers.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE39857A0CB8ADCB00223765 /* ASTConsumers.cpp */; }; + DE3986F00CB8D4B300223765 /* IdentifierTable.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE3986EF0CB8D4B300223765 /* IdentifierTable.h */; }; + DE3986F40CB8D50C00223765 /* IdentifierTable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE3986F30CB8D50C00223765 /* IdentifierTable.cpp */; }; DE4264FC0C113592005A861D /* CGDecl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE4264FB0C113592005A861D /* CGDecl.cpp */; }; DE46BF280AE0A82D00CC047C /* TargetInfo.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DE46BF270AE0A82D00CC047C /* TargetInfo.h */; }; DE4772FA0C10EAE5002239E8 /* CGStmt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DE4772F90C10EAE5002239E8 /* CGStmt.cpp */; }; @@ -104,7 +106,6 @@ DED7D7460A524295003AD0FB /* SourceManager.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DED7D7360A524295003AD0FB /* SourceManager.h */; }; DED7D7470A524295003AD0FB /* TokenKinds.def in CopyFiles */ = {isa = PBXBuildFile; fileRef = DED7D7370A524295003AD0FB /* TokenKinds.def */; }; DED7D7480A524295003AD0FB /* TokenKinds.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DED7D7380A524295003AD0FB /* TokenKinds.h */; }; - DED7D7490A524295003AD0FB /* IdentifierTable.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DED7D73A0A524295003AD0FB /* IdentifierTable.h */; }; DED7D74A0A524295003AD0FB /* Lexer.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DED7D73B0A524295003AD0FB /* Lexer.h */; }; DED7D74C0A524295003AD0FB /* MacroExpander.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DED7D73D0A524295003AD0FB /* MacroExpander.h */; }; DED7D74D0A524295003AD0FB /* MacroInfo.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = DED7D73E0A524295003AD0FB /* MacroInfo.h */; }; @@ -114,7 +115,6 @@ DED7D77B0A5242C7003AD0FB /* FileManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DED7D75E0A5242C7003AD0FB /* FileManager.cpp */; }; DED7D7890A5242C7003AD0FB /* SourceManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DED7D76D0A5242C7003AD0FB /* SourceManager.cpp */; }; DED7D78A0A5242C7003AD0FB /* TokenKinds.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DED7D76E0A5242C7003AD0FB /* TokenKinds.cpp */; }; - DED7D7C20A5242E6003AD0FB /* IdentifierTable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DED7D79D0A5242E6003AD0FB /* IdentifierTable.cpp */; }; DED7D7C30A5242E6003AD0FB /* Lexer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DED7D79E0A5242E6003AD0FB /* Lexer.cpp */; }; DED7D7C50A5242E6003AD0FB /* MacroInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DED7D7A00A5242E6003AD0FB /* MacroInfo.cpp */; }; DED7D7C70A5242E6003AD0FB /* PPExpressions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = DED7D7A20A5242E6003AD0FB /* PPExpressions.cpp */; }; @@ -152,7 +152,6 @@ DED7D7460A524295003AD0FB /* SourceManager.h in CopyFiles */, DED7D7470A524295003AD0FB /* TokenKinds.def in CopyFiles */, DED7D7480A524295003AD0FB /* TokenKinds.h in CopyFiles */, - DED7D7490A524295003AD0FB /* IdentifierTable.h in CopyFiles */, DED7D74A0A524295003AD0FB /* Lexer.h in CopyFiles */, DED7D74C0A524295003AD0FB /* MacroExpander.h in CopyFiles */, DED7D74D0A524295003AD0FB /* MacroInfo.h in CopyFiles */, @@ -204,6 +203,7 @@ DEF7D9F70C9C8B1A0001F598 /* Rewriter.h in CopyFiles */, 84AF36A10CB17A3B00C820A5 /* DeclObjC.h in CopyFiles */, DE3985790CB8ADC800223765 /* ASTConsumers.h in CopyFiles */, + DE3986F00CB8D4B300223765 /* IdentifierTable.h in CopyFiles */, ); runOnlyForDeploymentPostprocessing = 1; }; @@ -271,6 +271,8 @@ DE3464210B03040900DBC861 /* Type.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = Type.h; path = clang/AST/Type.h; sourceTree = ""; }; DE3985780CB8ADC800223765 /* ASTConsumers.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = ASTConsumers.h; path = Driver/ASTConsumers.h; sourceTree = ""; }; DE39857A0CB8ADCB00223765 /* ASTConsumers.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = ASTConsumers.cpp; path = Driver/ASTConsumers.cpp; sourceTree = ""; }; + DE3986EF0CB8D4B300223765 /* IdentifierTable.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; name = IdentifierTable.h; path = include/clang/Basic/IdentifierTable.h; sourceTree = SOURCE_ROOT; }; + DE3986F30CB8D50C00223765 /* IdentifierTable.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = IdentifierTable.cpp; sourceTree = ""; }; DE4264FB0C113592005A861D /* CGDecl.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = CGDecl.cpp; path = CodeGen/CGDecl.cpp; sourceTree = ""; }; DE46BF270AE0A82D00CC047C /* TargetInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TargetInfo.h; sourceTree = ""; }; DE4772F90C10EAE5002239E8 /* CGStmt.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; name = CGStmt.cpp; path = CodeGen/CGStmt.cpp; sourceTree = ""; }; @@ -322,7 +324,6 @@ DED7D7360A524295003AD0FB /* SourceManager.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = SourceManager.h; sourceTree = ""; }; DED7D7370A524295003AD0FB /* TokenKinds.def */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = TokenKinds.def; sourceTree = ""; }; DED7D7380A524295003AD0FB /* TokenKinds.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = TokenKinds.h; sourceTree = ""; }; - DED7D73A0A524295003AD0FB /* IdentifierTable.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = IdentifierTable.h; sourceTree = ""; }; DED7D73B0A524295003AD0FB /* Lexer.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = Lexer.h; sourceTree = ""; }; DED7D73D0A524295003AD0FB /* MacroExpander.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MacroExpander.h; sourceTree = ""; }; DED7D73E0A524295003AD0FB /* MacroInfo.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = MacroInfo.h; sourceTree = ""; }; @@ -332,7 +333,6 @@ DED7D75E0A5242C7003AD0FB /* FileManager.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = FileManager.cpp; sourceTree = ""; }; DED7D76D0A5242C7003AD0FB /* SourceManager.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = SourceManager.cpp; sourceTree = ""; }; DED7D76E0A5242C7003AD0FB /* TokenKinds.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = TokenKinds.cpp; sourceTree = ""; }; - DED7D79D0A5242E6003AD0FB /* IdentifierTable.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = IdentifierTable.cpp; sourceTree = ""; }; DED7D79E0A5242E6003AD0FB /* Lexer.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = Lexer.cpp; sourceTree = ""; }; DED7D7A00A5242E6003AD0FB /* MacroInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = MacroInfo.cpp; sourceTree = ""; }; DED7D7A20A5242E6003AD0FB /* PPExpressions.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = PPExpressions.cpp; sourceTree = ""; }; @@ -651,7 +651,7 @@ children = ( DE3450D60AEB543100DBC861 /* DirectoryLookup.h */, DE344AB70AE5DF6D00DBC861 /* HeaderSearch.h */, - DED7D73A0A524295003AD0FB /* IdentifierTable.h */, + DE3986EF0CB8D4B300223765 /* IdentifierTable.h */, DED7D73B0A524295003AD0FB /* Lexer.h */, 1A869A6E0BA2164C008DA07A /* LiteralSupport.h */, DED7D73D0A524295003AD0FB /* MacroExpander.h */, @@ -672,6 +672,7 @@ children = ( DED7D75D0A5242C7003AD0FB /* Diagnostic.cpp */, DED7D75E0A5242C7003AD0FB /* FileManager.cpp */, + DE3986F30CB8D50C00223765 /* IdentifierTable.cpp */, DED7D76D0A5242C7003AD0FB /* SourceManager.cpp */, DED7D76E0A5242C7003AD0FB /* TokenKinds.cpp */, DED626C80AE0C065001E80A4 /* TargetInfo.cpp */, @@ -683,7 +684,6 @@ isa = PBXGroup; children = ( DE344B530AE5E46C00DBC861 /* HeaderSearch.cpp */, - DED7D79D0A5242E6003AD0FB /* IdentifierTable.cpp */, DED7D79E0A5242E6003AD0FB /* Lexer.cpp */, 1A869AA70BA21ABA008DA07A /* LiteralSupport.cpp */, DE3451570AEC176100DBC861 /* MacroExpander.cpp */, @@ -758,7 +758,6 @@ DED7D77B0A5242C7003AD0FB /* FileManager.cpp in Sources */, DED7D7890A5242C7003AD0FB /* SourceManager.cpp in Sources */, DED7D78A0A5242C7003AD0FB /* TokenKinds.cpp in Sources */, - DED7D7C20A5242E6003AD0FB /* IdentifierTable.cpp in Sources */, DED7D7C30A5242E6003AD0FB /* Lexer.cpp in Sources */, DED7D7C50A5242E6003AD0FB /* MacroInfo.cpp in Sources */, DED7D7C70A5242E6003AD0FB /* PPExpressions.cpp in Sources */, @@ -824,6 +823,7 @@ 3513BD550C9F207900FA56C6 /* UninitializedValues.cpp in Sources */, 35CFFE000CA1CBCB00E6F2BE /* StmtViz.cpp in Sources */, DE39857B0CB8ADCB00223765 /* ASTConsumers.cpp in Sources */, + DE3986F40CB8D50C00223765 /* IdentifierTable.cpp in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/include/clang/AST/ASTContext.h b/include/clang/AST/ASTContext.h index 3385ca8c22..494b28f9b1 100644 --- a/include/clang/AST/ASTContext.h +++ b/include/clang/AST/ASTContext.h @@ -14,7 +14,6 @@ #ifndef LLVM_CLANG_AST_ASTCONTEXT_H #define LLVM_CLANG_AST_ASTCONTEXT_H -#include "clang/Lex/IdentifierTable.h" // FIXME: Move IdentifierTable to Basic #include "clang/AST/Builtins.h" #include "clang/AST/Expr.h" #include "clang/AST/RecordLayout.h" @@ -26,6 +25,7 @@ namespace clang { class TargetInfo; + class IdentifierTable; /// ASTContext - This class holds long-lived AST nodes (such as types and /// decls) that can be referred to throughout the semantic analysis of a file. diff --git a/include/clang/AST/Decl.h b/include/clang/AST/Decl.h index 748abb2782..e31c1e1c60 100644 --- a/include/clang/AST/Decl.h +++ b/include/clang/AST/Decl.h @@ -17,13 +17,13 @@ #include "clang/Basic/SourceLocation.h" #include "clang/AST/Type.h" #include "llvm/ADT/APSInt.h" -#include "clang/Lex/IdentifierTable.h" // FIXME: should be in Basic, not Lex. namespace clang { class Expr; class Stmt; class FunctionDecl; class AttributeList; +class IdentifierInfo; /// Decl - This represents one declaration (or definition), e.g. a variable, /// typedef, function, struct, etc. diff --git a/include/clang/AST/DeclObjC.h b/include/clang/AST/DeclObjC.h index 62633fb62c..88da3a20a9 100644 --- a/include/clang/AST/DeclObjC.h +++ b/include/clang/AST/DeclObjC.h @@ -15,6 +15,7 @@ #define LLVM_CLANG_AST_DECLOBJC_H #include "clang/AST/Decl.h" +#include "clang/Basic/IdentifierTable.h" namespace clang { class Expr; diff --git a/include/clang/AST/Expr.h b/include/clang/AST/Expr.h index d260cb7193..650fce34e8 100644 --- a/include/clang/AST/Expr.h +++ b/include/clang/AST/Expr.h @@ -17,9 +17,9 @@ #include "clang/AST/Stmt.h" #include "clang/AST/Type.h" #include "clang/AST/Decl.h" +#include "clang/Basic/IdentifierTable.h" #include "llvm/ADT/APSInt.h" #include "llvm/ADT/APFloat.h" -#include "clang/Lex/IdentifierTable.h" // FIXME: should be in Basic, not Lex. namespace clang { class IdentifierInfo; diff --git a/include/clang/Lex/IdentifierTable.h b/include/clang/Basic/IdentifierTable.h similarity index 97% rename from include/clang/Lex/IdentifierTable.h rename to include/clang/Basic/IdentifierTable.h index c8b9ddcd93..3272d2c2ee 100644 --- a/include/clang/Lex/IdentifierTable.h +++ b/include/clang/Basic/IdentifierTable.h @@ -7,15 +7,14 @@ // //===----------------------------------------------------------------------===// // -// This file defines the IdentifierInfo and IdentifierTable interfaces. +// This file defines the IdentifierInfo, IdentifierTable, and Selector +// interfaces. // //===----------------------------------------------------------------------===// -#ifndef LLVM_CLANG_LEX_IDENTIFIERTABLE_H -#define LLVM_CLANG_LEX_IDENTIFIERTABLE_H +#ifndef LLVM_CLANG_BASIC_IDENTIFIERTABLE_H +#define LLVM_CLANG_BASIC_IDENTIFIERTABLE_H -// FIXME: Move this header header/module to the "Basic" library. Unlike Lex, -// this data is long-lived. #include "clang/Basic/TokenKinds.h" #include "llvm/ADT/StringMap.h" #include "llvm/ADT/SmallString.h" diff --git a/include/clang/Lex/Preprocessor.h b/include/clang/Lex/Preprocessor.h index d23d9ffaa5..5fbd1faac8 100644 --- a/include/clang/Lex/Preprocessor.h +++ b/include/clang/Lex/Preprocessor.h @@ -14,9 +14,9 @@ #ifndef LLVM_CLANG_LEX_PREPROCESSOR_H #define LLVM_CLANG_LEX_PREPROCESSOR_H -#include "clang/Lex/IdentifierTable.h" #include "clang/Lex/Lexer.h" #include "clang/Lex/MacroExpander.h" +#include "clang/Basic/IdentifierTable.h" #include "clang/Basic/SourceLocation.h" #include "llvm/ADT/DenseMap.h" diff --git a/include/clang/Parse/Action.h b/include/clang/Parse/Action.h index 204bd6cfb5..07b21f700c 100644 --- a/include/clang/Parse/Action.h +++ b/include/clang/Parse/Action.h @@ -14,9 +14,9 @@ #ifndef LLVM_CLANG_PARSE_ACTION_H #define LLVM_CLANG_PARSE_ACTION_H +#include "clang/Basic/IdentifierTable.h" #include "clang/Basic/SourceLocation.h" #include "clang/Basic/TokenKinds.h" -#include "clang/Lex/IdentifierTable.h" // FIXME: should be in Basic, not Lex. namespace clang { // Semantic.