Add SwiftCorelibsCoreFoundation, Utilities targets and UtilitiesTests#203
Merged
Add SwiftCorelibsCoreFoundation, Utilities targets and UtilitiesTests#203
Conversation
Extract Util files from OpenAttributeGraphCxx into a standalone Utilities target with its own Base.hpp to avoid circular dependencies. Add SwiftCorelibsCoreFoundation target with CF headers for non-Darwin platform support.
Add -ftyped-memory-operations and -ftyped-cxx-new-delete to shared C/C++ settings so malloc() and operator new are rewritten to their type-aware variants (malloc_type_malloc, operator new with std::__type_descriptor_t), matching AttributeGraph's codegen. Also add darwinPlatforms extension and simplify OAGTupleWithBuffer by removing the manual malloc_type_malloc call now that the compiler handles the rewrite automatically.
Match Compute's layout by using an explicit umbrella header instead of an umbrella directory in the modulemap.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #203 +/- ##
=======================================
Coverage 10.12% 10.12%
=======================================
Files 28 28
Lines 820 820
=======================================
Hits 83 83
Misses 737 737 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
SwiftCorelibsCoreFoundationtarget providing CoreFoundation headers for non-Darwin platformsUtilitiestarget by refactoring utility code (HashTable, Heap, ForwardList, cf_ptr, objc_ptr, free_deleter) out ofOpenAttributeGraphCxxinto a standalone moduleUtilitiesTeststarget with tests for ForwardList, HashTable, and Heapplatform/malloc.hfor cross-platform malloc zone shims-ftyped-memory-operations,-ftyped-cxx-new-delete) on Darwin platforms for xzone malloc supportUtilities.hppumbrella header and update modulemapspoint_hashand update header documentationTest plan
swift buildsucceeds on macOSswift testpasses UtilitiesTests (ForwardList, HashTable, Heap)swift build