summaryrefslogtreecommitdiff
path: root/include/llvm/Support/YAMLParser.h
diff options
context:
space:
mode:
authorKaelyn Uhrain <rikka@google.com>2012-04-05 23:06:17 +0000
committerKaelyn Uhrain <rikka@google.com>2012-04-05 23:06:17 +0000
commit42730cec0b6b19986bf83db2490f70de8c8139fa (patch)
tree751784f42bcb2410165a9db0dbc628dbf7d086d6 /include/llvm/Support/YAMLParser.h
parent10d8971c00ecf4ec4750ecba7faf94651ec18a3a (diff)
downloadllvm-42730cec0b6b19986bf83db2490f70de8c8139fa.tar.gz
llvm-42730cec0b6b19986bf83db2490f70de8c8139fa.tar.bz2
llvm-42730cec0b6b19986bf83db2490f70de8c8139fa.tar.xz
Fix the build breakage introduced by r154131.
The empty 1-argument operator delete is for the benefit of the destructor. A couple of spot checks of running yaml-bench under valgrind against a few of the files under test/YAMLParser did not reveal any leaks introduced by this change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@154137 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/YAMLParser.h')
-rw-r--r--include/llvm/Support/YAMLParser.h22
1 files changed, 3 insertions, 19 deletions
diff --git a/include/llvm/Support/YAMLParser.h b/include/llvm/Support/YAMLParser.h
index 85ecc13d96..b24cacd3c3 100644
--- a/include/llvm/Support/YAMLParser.h
+++ b/include/llvm/Support/YAMLParser.h
@@ -149,7 +149,9 @@ protected:
OwningPtr<Document> &Doc;
SMRange SourceRange;
- virtual ~Node();
+ void operator delete(void *) throw() {}
+
+ virtual ~Node() {}
private:
unsigned int TypeID;
@@ -168,9 +170,6 @@ public:
static inline bool classof(const Node *N) {
return N->getType() == NK_Null;
}
-
-protected:
- virtual ~NullNode();
};
/// @brief A scalar node is an opaque datum that can be presented as a
@@ -205,9 +204,6 @@ public:
return N->getType() == NK_Scalar;
}
-protected:
- virtual ~ScalarNode();
-
private:
StringRef Value;
@@ -255,9 +251,6 @@ public:
return N->getType() == NK_KeyValue;
}
-protected:
- virtual ~KeyValueNode();
-
private:
Node *Key;
Node *Value;
@@ -374,9 +367,6 @@ public:
return N->getType() == NK_Mapping;
}
-protected:
- virtual ~MappingNode();
-
private:
MappingType Type;
bool IsAtBeginning;
@@ -440,9 +430,6 @@ public:
return N->getType() == NK_Sequence;
}
-protected:
- virtual ~SequenceNode();
-
private:
SequenceType SeqType;
bool IsAtBeginning;
@@ -468,9 +455,6 @@ public:
return N->getType() == NK_Alias;
}
-protected:
- virtual ~AliasNode();
-
private:
StringRef Name;
};