aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Support/YAMLTraits.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Support/YAMLTraits.h')
-rw-r--r--include/llvm/Support/YAMLTraits.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/include/llvm/Support/YAMLTraits.h b/include/llvm/Support/YAMLTraits.h
index a23faf6..023dcee7 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);