[llvm-libc] Fix missing virtual destructor

Summary: This patch adds a virtual destructor to the Command class.

Reviewers: sivachandra

Subscribers: mgorny, MaskRay, libc-commits

Tags: #libc-project

Differential Revision: https://reviews.llvm.org/D72253
This commit is contained in:
Guillaume Chatelet 2020-01-06 13:31:45 +01:00
parent f88d52728b
commit 3e1f3b164c
3 changed files with 18 additions and 0 deletions

View File

@ -1,5 +1,6 @@
add_tablegen(libc-hdrgen llvm-libc
Command.h
Command.cpp
Generator.cpp
Generator.h
IncludeFileCommand.cpp

View File

@ -0,0 +1,15 @@
//===-------- Base class for header generation commands ---------*- C++ -*-===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#include "Command.h"
namespace llvm_libc {
Command::~Command() {}
} // namespace llvm_libc

View File

@ -42,6 +42,8 @@ public:
}
};
virtual ~Command();
virtual void run(llvm::raw_ostream &OS, const ArgVector &Args,
llvm::StringRef StdHeader, llvm::RecordKeeper &Records,
const ErrorReporter &Reporter) const = 0;