[libc-commits] [PATCH] D72253: [llvm-libc] Fix missing virtual destructor

Guillaume Chatelet via Phabricator via libc-commits libc-commits at lists.llvm.org
Mon Jan 6 08:38:34 PST 2020


gchatelet updated this revision to Diff 236381.
gchatelet marked an inline comment as done.
gchatelet added a comment.

- Fixed wrong description for the header


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D72253/new/

https://reviews.llvm.org/D72253

Files:
  libc/utils/HdrGen/CMakeLists.txt
  libc/utils/HdrGen/Command.cpp
  libc/utils/HdrGen/Command.h


Index: libc/utils/HdrGen/Command.h
===================================================================
--- libc/utils/HdrGen/Command.h
+++ libc/utils/HdrGen/Command.h
@@ -42,6 +42,8 @@
     }
   };
 
+  virtual ~Command();
+
   virtual void run(llvm::raw_ostream &OS, const ArgVector &Args,
                    llvm::StringRef StdHeader, llvm::RecordKeeper &Records,
                    const ErrorReporter &Reporter) const = 0;
Index: libc/utils/HdrGen/Command.cpp
===================================================================
--- /dev/null
+++ 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
Index: libc/utils/HdrGen/CMakeLists.txt
===================================================================
--- libc/utils/HdrGen/CMakeLists.txt
+++ 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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72253.236381.patch
Type: text/x-patch
Size: 1398 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20200106/b237de74/attachment.bin>


More information about the libc-commits mailing list