diff options
| author | Guillaume Chatelet <gchatelet@google.com> | 2020-01-06 13:31:45 +0100 |
|---|---|---|
| committer | Guillaume Chatelet <gchatelet@google.com> | 2020-01-06 17:42:05 +0100 |
| commit | 3e1f3b164cc0b4be486eebf24cca79c9f9c8c1f7 (patch) | |
| tree | 3465dd651bf7bbe1333ca6b0d8965beddfd814a4 /libc | |
| parent | f88d52728b9c7f91e4cfec657c0fc60be07d2cb4 (diff) | |
| download | bcm5719-llvm-3e1f3b164cc0b4be486eebf24cca79c9f9c8c1f7.tar.gz bcm5719-llvm-3e1f3b164cc0b4be486eebf24cca79c9f9c8c1f7.zip | |
[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
Diffstat (limited to 'libc')
| -rw-r--r-- | libc/utils/HdrGen/CMakeLists.txt | 1 | ||||
| -rw-r--r-- | libc/utils/HdrGen/Command.cpp | 15 | ||||
| -rw-r--r-- | libc/utils/HdrGen/Command.h | 2 |
3 files changed, 18 insertions, 0 deletions
diff --git a/libc/utils/HdrGen/CMakeLists.txt b/libc/utils/HdrGen/CMakeLists.txt index 95b9a8952eb..d72223e4192 100644 --- a/libc/utils/HdrGen/CMakeLists.txt +++ b/libc/utils/HdrGen/CMakeLists.txt @@ -1,5 +1,6 @@ add_tablegen(libc-hdrgen llvm-libc Command.h + Command.cpp Generator.cpp Generator.h IncludeFileCommand.cpp diff --git a/libc/utils/HdrGen/Command.cpp b/libc/utils/HdrGen/Command.cpp new file mode 100644 index 00000000000..81c68301a6d --- /dev/null +++ b/libc/utils/HdrGen/Command.cpp @@ -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 diff --git a/libc/utils/HdrGen/Command.h b/libc/utils/HdrGen/Command.h index 759e4315ff9..302b40ca6cb 100644 --- a/libc/utils/HdrGen/Command.h +++ b/libc/utils/HdrGen/Command.h @@ -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; |

