Skip to content

Commit 774ee96

Browse files
author
Christian Convey
authored
[relay] add missing virtual d'tor (#11601)
Add a default virtual destructor to `tvm::relay::transforms::GlobalSymbolCache`, so that correct destructors run when destroying subclass instances.
1 parent d8f57ed commit 774ee96

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/relay/transforms/compiler_function_utils.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ class CallRewriter : public MixedModeMutator {
119119

120120
} // namespace
121121

122+
GlobalSymbolCache::~GlobalSymbolCache() = default;
123+
122124
GlobalVar ExistingGlobalSymbolCache::GetGlobalSymbol(const Function& function) {
123125
Optional<String> opt_global_symbol = function->GetAttr<String>(tvm::attr::kGlobalSymbol);
124126
ICHECK(opt_global_symbol.defined())

src/relay/transforms/compiler_function_utils.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ namespace transforms {
7171
*/
7272
class GlobalSymbolCache {
7373
public:
74+
virtual ~GlobalSymbolCache();
7475
virtual GlobalVar GetGlobalSymbol(const Function& function) = 0;
7576
};
7677

0 commit comments

Comments
 (0)