[llvm-commits] [llvm] r154137 - /llvm/trunk/include/llvm/Support/YAMLParser.h
Kaelyn Uhrain
rikka at google.com
Thu Apr 5 16:06:17 PDT 2012
Author: rikka
Date: Thu Apr 5 18:06:17 2012
New Revision: 154137
URL: http://llvm.org/viewvc/llvm-project?rev=154137&view=rev
Log:
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.
Modified:
llvm/trunk/include/llvm/Support/YAMLParser.h
Modified: llvm/trunk/include/llvm/Support/YAMLParser.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/YAMLParser.h?rev=154137&r1=154136&r2=154137&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/YAMLParser.h (original)
+++ llvm/trunk/include/llvm/Support/YAMLParser.h Thu Apr 5 18:06:17 2012
@@ -149,7 +149,9 @@
OwningPtr<Document> &Doc;
SMRange SourceRange;
- virtual ~Node();
+ void operator delete(void *) throw() {}
+
+ virtual ~Node() {}
private:
unsigned int TypeID;
@@ -168,9 +170,6 @@
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 @@
return N->getType() == NK_Scalar;
}
-protected:
- virtual ~ScalarNode();
-
private:
StringRef Value;
@@ -255,9 +251,6 @@
return N->getType() == NK_KeyValue;
}
-protected:
- virtual ~KeyValueNode();
-
private:
Node *Key;
Node *Value;
@@ -374,9 +367,6 @@
return N->getType() == NK_Mapping;
}
-protected:
- virtual ~MappingNode();
-
private:
MappingType Type;
bool IsAtBeginning;
@@ -440,9 +430,6 @@
return N->getType() == NK_Sequence;
}
-protected:
- virtual ~SequenceNode();
-
private:
SequenceType SeqType;
bool IsAtBeginning;
@@ -468,9 +455,6 @@
return N->getType() == NK_Alias;
}
-protected:
- virtual ~AliasNode();
-
private:
StringRef Name;
};
More information about the llvm-commits
mailing list