Skip to content

[cmake]: Second try at making swift-api-digester work correctly. #5512

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 29, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ function(get_test_dependencies SDK result_var_name)

set(deps_binaries
swift swift-ide-test sil-opt swift-llvm-opt swift-demangle sil-extract
lldb-moduleimport-test swift-reflection-dump swift-remoteast-test)
lldb-moduleimport-test swift-reflection-dump swift-remoteast-test
swift-api-digester)
if(NOT SWIFT_BUILT_STANDALONE)
list(APPEND deps_binaries FileCheck arcmt-test c-arcmt-test c-index-test
clang llc llvm-cov llvm-dwarfdump llvm-link llvm-profdata not)
Expand Down
7 changes: 1 addition & 6 deletions tools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,12 @@ add_swift_tool_subdirectory(swift-demangle)
add_swift_tool_subdirectory(lldb-moduleimport-test)
add_swift_tool_subdirectory(sil-extract)
add_swift_tool_subdirectory(swift-llvm-opt)

if(SWIFT_HOST_VARIANT STREQUAL "macosx")
# Only build Darwin-specific tools when deploying to OS X.
add_swift_tool_subdirectory(swift-api-digester)
endif()
add_swift_tool_subdirectory(swift-api-digester)

if(SWIFT_BUILD_SOURCEKIT)
add_swift_tool_subdirectory(SourceKit)
endif()


is_sdk_requested("${SWIFT_HOST_VARIANT_SDK}" SWIFT_HOST_SDK_REQUESTED)
if(SWIFT_BUILD_STDLIB AND SWIFT_HOST_SDK_REQUESTED)
add_swift_tool_subdirectory(swift-reflection-dump)
Expand Down
6 changes: 3 additions & 3 deletions tools/swift-api-digester/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
add_swift_executable(swift-api-digester
add_swift_host_tool(swift-api-digester
swift-api-digester.cpp
LINK_LIBRARIES
swiftFrontend swiftIDE
LINK_LIBRARIES swiftFrontend swiftIDE
SWIFT_COMPONENT tools
)
6 changes: 3 additions & 3 deletions tools/swift-api-digester/swift-api-digester.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ struct SDKNodeInitInfo {
};

class SDKNode {
typedef std::vector<NodeUniquePtr>::const_iterator ChildIt;
typedef std::vector<NodeUniquePtr>::iterator ChildIt;
StringRef Name;
StringRef PrintedName;
unsigned TheKind : 4;
Expand All @@ -320,7 +320,7 @@ class SDKNode {
bool isNameValid() const { return Name != "_"; }
StringRef getPrintedName() const { return PrintedName; }
void removeChild(ChildIt CI) { Children.erase(CI); }
ChildIt getChildBegin() const { return Children.begin(); }
ChildIt getChildBegin() { return Children.begin(); }
void annotate(NodeAnnotation Anno) { Annotations.insert(Anno); }
NodePtr getParent() const { return Parent; };
unsigned getChildrenCount() const { return Children.size(); }
Expand Down Expand Up @@ -491,7 +491,7 @@ void SDKNode::postorderVisit(NodePtr Root, SDKNodeVisitor &Visitor) {
class SDKNodeVectorViewer {
ArrayRef<SDKNode*> Collection;
llvm::function_ref<bool(NodePtr)> Selector;
typedef ArrayRef<SDKNode*>::const_iterator VectorIt;
typedef ArrayRef<SDKNode*>::iterator VectorIt;
VectorIt getNext(VectorIt Start);
class ViewerIterator;

Expand Down