mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 13:10:10 +01:00
glsl: Clean up warnings about deleting classes without virtual destructors.
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
ea055e19c2
commit
a018747ac8
1 changed files with 10 additions and 0 deletions
|
|
@ -89,6 +89,16 @@ class ir_instruction : public exec_node {
|
|||
public:
|
||||
enum ir_node_type ir_type;
|
||||
|
||||
/**
|
||||
* GCC 4.7+ and clang warn when deleting an ir_instruction unless
|
||||
* there's a virtual destructor present. Because we almost
|
||||
* universally use ralloc for our memory management of
|
||||
* ir_instructions, the destructor doesn't need to do any work.
|
||||
*/
|
||||
virtual ~ir_instruction()
|
||||
{
|
||||
}
|
||||
|
||||
/** ir_print_visitor helper for debugging. */
|
||||
void print(void) const;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue