Commit Graph

7 Commits

Author SHA1 Message Date
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
4ea51cfe33 Revert "Add a verify-di-hole assertion to SILBuilder." 2023-03-23 13:27:06 -07:00
Adrian Prantl
5129aea296 Add a verify-di-hole assertion to SILBuilder.
The verify-di-hole SILVerifier pass is very useful in catching incorrectly set
SILDebugScopes, but it can be very tedious to track down the root cause of a
verification failure. This patch replicates much of its functionality inside an
assertion in SILBuilder, which will result in a backtrace pointing directly to
where the offending scope is being set.
2023-03-21 09:40:11 -07:00
Min-Yih Hsu
343d842394 [SIL][DebugInfo] PATCH 3/3: Deprecate debug_value_addr SIL instruciton
This patch removes all references to DebugValueAddrInst class and
debug_value_addr instruction in textual SIL files.
2021-08-31 12:01:04 -07:00
Michael Gottesman
6d4456c5ba [sil][debug-info] Add 'const' to maybeScopeless 'SILInstruction &' argument.
This function only uses the reference in a const way, so nothing changes
functionally, we can just pass it into contexts where we have a const
reference without fighting the compiler.
2021-05-19 19:07:15 -07:00
Michael Gottesman
96410196ac [gardening] Move maybeScopeLess from SIL/Verifier/SILVerifier.cpp -> SIL/IR/SILDebugScope.cpp.
This is defined in SILDebugScope.h, so I don't know why it was put into
SILVerifier.cpp.
2020-03-30 16:16:58 -07:00
Michael Gottesman
e1a19e4173 [sil] Split library into subfolders, while still building as a single library still.
Specifically, I split it into 3 initial categories: IR, Utils, Verifier. I just
did this quickly, we can always split it more later if we want.

I followed the model that we use in SILOptimizer: ./lib/SIL/CMakeLists.txt vends
 a macro (sil_register_sources) to the sub-folders that register the sources of
 the subdirectory with a global state variable that ./lib/SIL/CMakeLists.txt
 defines. Then after including those subdirs, the parent cmake declares the SIL
 library. So the output is the same, but we have the flexibility of having
 subdirectories to categorize source files.
2020-03-30 11:01:00 -07:00