Make it easy to safely get a shared_ptr to a Node given a plain old pointer to it. This is a small step towards getting all Demangler APIs to return Node* but still retain ref-counting

Swift SVN r20330
This commit is contained in:
Enrico Granata
2014-07-22 20:47:09 +00:00
parent dfe2ba4d8d
commit 6fc7ef2910

View File

@@ -34,7 +34,7 @@ struct DemangleOptions {
class Node;
typedef std::shared_ptr<Node> NodePointer;
class Node {
class Node : public std::enable_shared_from_this<Node> {
public:
enum class Kind : uint16_t {
#define NODE(ID) ID,