boot: Simplify object erasure

This erase_obj() machinery looks like voodoo and creates an awful lot of
noise as soon as we get back to building with -O0. We can do this in a
more simple way by introducing a struct that holds the information we
need on cleanup. When building with optimization enabled, all this gets
inlined and the eraser vanishes.
This commit is contained in:
Jan Janssen
2023-01-07 22:16:52 +01:00
committed by Lennart Poettering
parent f977356a82
commit 3f92dc2fd4
8 changed files with 52 additions and 63 deletions

View File

@@ -20,7 +20,7 @@ import semmle.code.cpp.controlflow.StackVariableReachability
* since they don't do anything illegal even when the variable is uninitialized
*/
predicate cleanupFunctionDenyList(string fun) {
fun = "erase_char" or fun = "erase_obj"
fun = "erase_char"
}
/**