Commit Graph

4 Commits

Author SHA1 Message Date
Michael Gottesman 8943dff0ee [gardening] Modernize BitDataflow debug printing to use print+dump pattern
NFC. Just peeling off small things from a alrger commit.

Replace the standalone dump() method with a print(llvm::raw_ostream &os)
method that writes to an arbitrary output stream, and implement dump() via
the SWIFT_DEBUG_DUMP macro delegating to print(llvm::dbgs()). Also fix a
minor indentation issue in the original dump() body and switch the loop
variable to a const reference.

This follows the standard Swift/SIL convention for debug-printable types,
making BitDataflow consistent with the rest of the codebase and allowing
its state to be printed to streams other than stderr.
2026-02-21 15:33:44 -08:00
Tim Kientzle 1d961ba22d Add #include "swift/Basic/Assertions.h" to a lot of source files
Although I don't plan to bring over new assertions wholesale
into the current qualification branch, it's entirely possible
that various minor changes in main will use the new assertions;
having this basic support in the release branch will simplify that.
(This is why I'm adding the includes as a separate pass from
rewriting the individual assertions)
2024-06-05 19:37:30 -07:00
Nate Chandler 600164257a [NFC] Moved SmallBitVector dumping to Basic.
Moved out of MemoryLocations.h and merged the implementations of <<,
keeping the version from MemoryLocations with its brackets and commas
available via a flag but defaulting the implementation previously in the
header.
2024-02-19 11:41:38 -08:00
Erik Eckstein 1baf009c06 refactoring: Split MemoryLifetime.cpp/h into three separate files
And rename MemoryDataflow -> BitDataflow.

MemoryLifetime contained MemoryLocations, MemoryDataflow and the MemoryLifetimeVerifier.
Three independent things, for which it makes sense to have them in three separated files.

NFC.
2021-03-13 10:41:30 +01:00