diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2015-01-18 16:17:27 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2015-01-18 16:17:27 +0000 |
commit | 67c32a98315f785a9ec9d531c1f571a0196c7463 (patch) | |
tree | 4abb9cbeecc7901726dd0b4a37369596c852e9ef /include/llvm/Support/YAMLTraits.h | |
parent | 9f61947910e6ab40de38e6b4034751ef1513200f (diff) |
Diffstat (limited to 'include/llvm/Support/YAMLTraits.h')
-rw-r--r-- | include/llvm/Support/YAMLTraits.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/include/llvm/Support/YAMLTraits.h b/include/llvm/Support/YAMLTraits.h index a23faf65bb596..023dcee7d54c6 100644 --- a/include/llvm/Support/YAMLTraits.h +++ b/include/llvm/Support/YAMLTraits.h @@ -943,16 +943,17 @@ private: }; class MapHNode : public HNode { + virtual void anchor(); + public: MapHNode(Node *n) : HNode(n) { } - virtual ~MapHNode(); static inline bool classof(const HNode *n) { return MappingNode::classof(n->_node); } static inline bool classof(const MapHNode *) { return true; } - typedef llvm::StringMap<HNode*> NameToNode; + typedef llvm::StringMap<std::unique_ptr<HNode>> NameToNode; bool isValidKey(StringRef key); @@ -961,19 +962,20 @@ private: }; class SequenceHNode : public HNode { + virtual void anchor(); + public: SequenceHNode(Node *n) : HNode(n) { } - virtual ~SequenceHNode(); static inline bool classof(const HNode *n) { return SequenceNode::classof(n->_node); } static inline bool classof(const SequenceHNode *) { return true; } - std::vector<HNode*> Entries; + std::vector<std::unique_ptr<HNode>> Entries; }; - Input::HNode *createHNodes(Node *node); + std::unique_ptr<Input::HNode> createHNodes(Node *node); void setError(HNode *hnode, const Twine &message); void setError(Node *node, const Twine &message); |