llvm-project/clang/lib/AST/CMakeLists.txt

86 lines
1.5 KiB
CMake
Raw Normal View History

set(LLVM_LINK_COMPONENTS support)
add_clang_library(clangAST
APValue.cpp
ASTConsumer.cpp
ASTContext.cpp
ASTDiagnostic.cpp
ASTDumper.cpp
ASTImporter.cpp
AttrImpl.cpp
CXXInheritance.cpp
Comment.cpp
CommentBriefParser.cpp
CommentCommandTraits.cpp
CommentLexer.cpp
CommentParser.cpp
CommentSema.cpp
Decl.cpp
DeclarationName.cpp
DeclBase.cpp
DeclCXX.cpp
DeclFriend.cpp
DeclGroup.cpp
DeclObjC.cpp
DeclOpenMP.cpp
DeclPrinter.cpp
DeclTemplate.cpp
DumpXML.cpp
Expr.cpp
ExprClassification.cpp
ExprConstant.cpp
ExprCXX.cpp
2011-02-28 22:32:11 +08:00
ExternalASTSource.cpp
InheritViz.cpp
ItaniumCXXABI.cpp
ItaniumMangle.cpp
LambdaMangleContext.cpp
Mangle.cpp
MicrosoftCXXABI.cpp
MicrosoftMangle.cpp
2009-03-19 08:18:19 +08:00
NestedNameSpecifier.cpp
NSAPI.cpp
ParentMap.cpp
RawCommentList.cpp
RecordLayout.cpp
2009-07-19 08:40:45 +08:00
RecordLayoutBuilder.cpp
SelectorLocationsKind.cpp
Stmt.cpp
StmtIterator.cpp
StmtPrinter.cpp
StmtProfile.cpp
StmtViz.cpp
TemplateBase.cpp
TemplateName.cpp
Type.cpp
2009-08-19 20:02:15 +08:00
TypeLoc.cpp
TypePrinter.cpp
VTableBuilder.cpp
VTTBuilder.cpp
)
add_dependencies(clangAST
ClangARMNeon
ClangAttrClasses
ClangAttrList
ClangAttrImpl
ClangAttrDump
Comment AST: TableGen'ize all command lists in CommentCommandTraits.cpp. Now we have a list of all commands. This is a good thing in itself, but it also enables us to easily implement typo correction for command names. With this change we have objects that contain information about each command, so it makes sense to resolve command name just once during lexing (currently we store command names as strings and do a linear search every time some property value is needed). Thus comment token and AST nodes were changed to contain a command ID -- index into a tables of builtin and registered commands. Unknown commands are registered during parsing and thus are also uniformly assigned an ID. Using an ID instead of a StringRef is also a nice memory optimization since ID is a small integer that fits into a common bitfield in Comment class. This change implies that to get any information about a command (even a command name) we need a CommandTraits object to resolve the command ID to CommandInfo*. Currently a fresh temporary CommandTraits object is created whenever it is needed since it does not have any state. But with this change it has state -- new commands can be registered, so a CommandTraits object was added to ASTContext. Also, in libclang CXComment has to be expanded to include a CXTranslationUnit so that all functions working on comment AST nodes can get a CommandTraits object. This breaks binary compatibility of CXComment APIs. Now clang_FullComment_getAsXML(CXTranslationUnit TU, CXComment CXC) doesn't need TU parameter anymore, so it was removed. This is a source-incompatible change for this C API. llvm-svn: 163540
2012-09-11 04:32:42 +08:00
ClangCommentCommandInfo
ClangCommentCommandList
ClangCommentNodes
ClangCommentHTMLTags
ClangCommentHTMLTagsProperties
ClangCommentHTMLNamedCharacterReferences
ClangDeclNodes
ClangDiagnosticAST
ClangDiagnosticComment
ClangDiagnosticCommon
ClangDiagnosticSema
ClangStmtNodes
)
target_link_libraries(clangAST
clangBasic
clangLex
)