mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
SIL: Check for leaked instructions in the SILVerifier and in the SILModule destructor.
This commit is contained in:
@@ -650,6 +650,19 @@ public:
|
||||
/// invariants.
|
||||
void verify() const;
|
||||
|
||||
/// Check if there are any leaking instructions.
|
||||
///
|
||||
/// Aborts with an error if more instructions are allocated than contained in
|
||||
/// the module.
|
||||
void checkForLeaks() const;
|
||||
|
||||
/// Check if there are any leaking instructions after the SILModule is
|
||||
/// destructed.
|
||||
///
|
||||
/// The SILModule destructor already calls checkForLeaks(). This function is
|
||||
/// useful to check if the destructor itself destroys all data structures.
|
||||
static void checkForLeaksAfterDestruction();
|
||||
|
||||
/// Pretty-print the module.
|
||||
void dump(bool Verbose = false) const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user