diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2015-05-20 15:38:29 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2015-05-20 15:38:29 +0000 |
commit | 4e3cb46b14e98bf1b3ebd13ff960de5943b9cacc (patch) | |
tree | bda12c712a5f4f9f5ff276fc4788248ad5d7a8bd /llvm | |
parent | a8512b1784455ad8c3e7cbb7652281fbfa649a21 (diff) | |
download | bcm5719-llvm-4e3cb46b14e98bf1b3ebd13ff960de5943b9cacc.tar.gz bcm5719-llvm-4e3cb46b14e98bf1b3ebd13ff960de5943b9cacc.zip |
[YAML] Make Node's destructor non-virtual.
Nodes aren't supposed to be destroyed polymorphically. Also make all subclasses
final to avoid non-virtual dtor warnings.
llvm-svn: 237801
Diffstat (limited to 'llvm')
-rw-r--r-- | llvm/include/llvm/Support/YAMLParser.h | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/llvm/include/llvm/Support/YAMLParser.h b/llvm/include/llvm/Support/YAMLParser.h index 5158b591e0f..0fbb7d2e6c7 100644 --- a/llvm/include/llvm/Support/YAMLParser.h +++ b/llvm/include/llvm/Support/YAMLParser.h @@ -159,7 +159,7 @@ protected: void operator delete(void *) throw() {} - virtual ~Node() {} + ~Node() = default; private: unsigned int TypeID; @@ -172,7 +172,7 @@ private: /// /// Example: /// !!null null -class NullNode : public Node { +class NullNode final : public Node { void anchor() override; public: @@ -187,7 +187,7 @@ public: /// /// Example: /// Adena -class ScalarNode : public Node { +class ScalarNode final : public Node { void anchor() override; public: @@ -230,7 +230,7 @@ private: /// | /// Hello /// World -class BlockScalarNode : public Node { +class BlockScalarNode final : public Node { void anchor() override; public: @@ -260,7 +260,7 @@ private: /// /// Example: /// Section: .text -class KeyValueNode : public Node { +class KeyValueNode final : public Node { void anchor() override; public: @@ -371,7 +371,7 @@ template <class CollectionType> void skip(CollectionType &C) { /// Example: /// Name: _main /// Scope: Global -class MappingNode : public Node { +class MappingNode final : public Node { void anchor() override; public: @@ -418,7 +418,7 @@ private: /// Example: /// - Hello /// - World -class SequenceNode : public Node { +class SequenceNode final : public Node { void anchor() override; public: @@ -471,7 +471,7 @@ private: /// /// Example: /// *AnchorName -class AliasNode : public Node { +class AliasNode final : public Node { void anchor() override; public: |