Files
swift-mirror/lib/Parse/CMakeLists.txt
Alex Hoppen a47bd7089e [libSyntax] Don't create dedicated deferred nodes in SyntaxTreeCreator
We have finally reached our goal of optimising deferred node creation
for SyntaxTreeCreator. Instead of creating dedicated deferred nodes and
copying the data into a RawSyntax node when recording, we always create
RawSyntax nodes. Recording a deferred node is thus a no-op, since we
have already created a RawSyntax node. Should a deferred node not be
recorded, it stays alive in the SyntaxArena without any reference to it.
While this means, we are leaking some memory for such nodes, most nodes
do get recorded, so the overhead should be fine compared to the
performance benefit.
2021-03-10 08:48:18 +01:00

37 lines
926 B
CMake

set_swift_llvm_is_available()
if(CMAKE_HOST_SYSTEM_NAME STREQUAL Windows)
set(SWIFT_GYB_FLAGS --line-directive "^\"#line %(line)d \\\"%(file)s\\\"^\"")
else()
set(SWIFT_GYB_FLAGS --line-directive "\'#line" "%(line)d" "\"%(file)s\"\'")
endif()
add_swift_host_library(swiftParse STATIC
Confusables.cpp
Lexer.cpp
ParseDecl.cpp
ParsedRawSyntaxNode.cpp
ParsedRawSyntaxRecorder.cpp
ParsedTrivia.cpp
ParseExpr.cpp
ParseGeneric.cpp
ParseIfConfig.cpp
ParsePattern.cpp
Parser.cpp
ParseRequests.cpp
ParseStmt.cpp
ParseType.cpp
PersistentParserState.cpp
SyntaxParsingCache.cpp
SyntaxParsingContext.cpp)
_swift_gyb_target_sources(swiftParse PRIVATE
ParsedSyntaxBuilders.cpp.gyb
ParsedSyntaxNodes.cpp.gyb
ParsedSyntaxRecorder.cpp.gyb)
target_link_libraries(swiftParse PRIVATE
swiftAST
swiftSyntax
swiftSyntaxParse)
add_dependencies(swiftParse swift-parse-syntax-generated-headers)