Files
swift-mirror/lib/PrintAsClang/ModuleContentsWriter.cpp
Becca Royal-Gordon de63f47224 [PrintAsClang] [NFC] Refactor decl sorting
Factor ModuleContentsWriter’s declaration sorting out into a separate helper function, and additionally rework that function into a series of abstract comparisons supported by various helper functions. This declutters the function and makes the high-level logic it implements much more clear, at the cost of hiding much of the control flow inside a macro.

This also makes a very small change to the handling of generic signature comparisons: declarations without a generic signature will be factored into comparisons by comparing an empty string.
2025-02-17 17:03:04 -08:00

41 KiB