mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-27 02:31:09 +00:00
fix a unitialized pointer in NamedMDNode (and reenable unittest)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77597 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a114baa5bf
commit
20cc4b8cd9
@ -35,7 +35,7 @@ void MDNode::Profile(FoldingSetNodeID &ID) const {
|
|||||||
//
|
//
|
||||||
NamedMDNode::NamedMDNode(const Twine &N, MetadataBase*const* MDs,
|
NamedMDNode::NamedMDNode(const Twine &N, MetadataBase*const* MDs,
|
||||||
unsigned NumMDs, Module *ParentModule)
|
unsigned NumMDs, Module *ParentModule)
|
||||||
: MetadataBase(Type::MetadataTy, Value::NamedMDNodeVal) {
|
: MetadataBase(Type::MetadataTy, Value::NamedMDNodeVal), Parent(0) {
|
||||||
setName(N);
|
setName(N);
|
||||||
for (unsigned i = 0; i != NumMDs; ++i)
|
for (unsigned i = 0; i != NumMDs; ++i)
|
||||||
Node.push_back(WeakMetadataVH(MDs[i]));
|
Node.push_back(WeakMetadataVH(MDs[i]));
|
||||||
|
@ -119,8 +119,6 @@ TEST(MDNodeTest, Delete) {
|
|||||||
EXPECT_STREQ("!0 = metadata !{null}\n", oss.str().c_str());
|
EXPECT_STREQ("!0 = metadata !{null}\n", oss.str().c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
// FIXME: Disabled, this crashes on linux.
|
|
||||||
#if 0
|
|
||||||
TEST(NamedMDNodeTest, Search) {
|
TEST(NamedMDNodeTest, Search) {
|
||||||
Constant *C = ConstantInt::get(Type::Int32Ty, 1);
|
Constant *C = ConstantInt::get(Type::Int32Ty, 1);
|
||||||
Constant *C2 = ConstantInt::get(Type::Int32Ty, 2);
|
Constant *C2 = ConstantInt::get(Type::Int32Ty, 2);
|
||||||
@ -141,5 +139,4 @@ TEST(NamedMDNodeTest, Search) {
|
|||||||
"!1 = metadata !{i32 2}\n",
|
"!1 = metadata !{i32 2}\n",
|
||||||
oss.str().c_str());
|
oss.str().c_str());
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user