nv50/ir: make Graph destructor virtual
authorStephan Bergmann <stephan.bergmann.secondary@googlemail.com>
Thu, 9 Jun 2016 15:13:20 +0000 (17:13 +0200)
committerIlia Mirkin <imirkin@alum.mit.edu>
Tue, 14 Jun 2016 02:55:11 +0000 (22:55 -0400)
Avoid ASan new-delete-type-mismatch when Function::domTree is created as
DominatorTree in Function::convertToSSA but destroyed only as base
Graph in ~Function.

Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/nouveau/codegen/nv50_ir_graph.h

index b0981ff..115f20e 100644 (file)
@@ -147,7 +147,7 @@ public:
 
 public:
    Graph();
-   ~Graph(); // does *not* free the nodes (make it an option ?)
+   virtual ~Graph(); // does *not* free the nodes (make it an option ?)
 
    inline Node *getRoot() const { return root; }