Metadata *Type, Metadata *Value),
(Tag, Scope, Name, Type, Value))
+ TempMDTemplateValueParameter clone() const { return cloneImpl(); }
+
Metadata *getValue() const { return getOperand(3); }
static bool classof(const Metadata *MD) {
(Scope, Name, LinkageName, File, Line, Type, IsLocalToUnit,
IsDefinition, Variable, StaticDataMemberDeclaration))
+ TempMDGlobalVariable clone() const { return cloneImpl(); }
+
bool isLocalToUnit() const { return IsLocalToUnit; }
bool isDefinition() const { return IsDefinition; }
StringRef getDisplayName() const { return getStringOperand(4); }
Metadata *InlinedAt = nullptr),
(Tag, Scope, Name, File, Line, Type, Arg, Flags, InlinedAt))
+ TempMDLocalVariable clone() const { return cloneImpl(); }
+
unsigned getArg() const { return Arg; }
unsigned getFlags() const { return Flags; }
Metadata *getInlinedAt() const { return getOperand(4); }
public:
DEFINE_MDNODE_GET(MDExpression, (ArrayRef<uint64_t> Elements), (Elements))
+ TempMDExpression clone() const { return cloneImpl(); }
+
ArrayRef<uint64_t> getElements() const { return Elements; }
unsigned getNumElements() const { return Elements.size(); }
(Name, File, Line, GetterName, SetterName, Attributes,
Type))
+ TempMDObjCProperty clone() const { return cloneImpl(); }
+
unsigned getLine() const { return Line; }
unsigned getAttributes() const { return Attributes; }
StringRef getName() const { return getStringOperand(0); }
EXPECT_EQ(Empty, N->getDwarfOperand(0));
ASSERT_TRUE(N->isUniqued());
EXPECT_EQ(N, GenericDebugNode::get(Context, 15, Header, Ops1));
+
+ TempGenericDebugNode Temp = N->clone();
+ EXPECT_EQ(N, MDNode::replaceWithUniqued(std::move(Temp)));
}
TEST_F(GenericDebugNodeTest, getEmptyHeader) {
EXPECT_EQ(7, N->getLo());
EXPECT_EQ(N, MDSubrange::get(Context, 5, 7));
EXPECT_EQ(MDSubrange::get(Context, 5, 0), MDSubrange::get(Context, 5));
+
+ TempMDSubrange Temp = N->clone();
+ EXPECT_EQ(N, MDNode::replaceWithUniqued(std::move(Temp)));
}
typedef MetadataTest MDEnumeratorTest;
EXPECT_NE(N, MDEnumerator::get(Context, 8, "name"));
EXPECT_NE(N, MDEnumerator::get(Context, 7, "nam"));
+
+ TempMDEnumerator Temp = N->clone();
+ EXPECT_EQ(N, MDNode::replaceWithUniqued(std::move(Temp)));
}
typedef MetadataTest MDBasicTypeTest;
25, 7));
EXPECT_NE(N, MDBasicType::get(Context, dwarf::DW_TAG_base_type, "special", 33,
26, 6));
+
+ TempMDBasicType Temp = N->clone();
+ EXPECT_EQ(N, MDNode::replaceWithUniqued(std::move(Temp)));
}
typedef MetadataTest MDDerivedTypeTest;
EXPECT_NE(N,
MDDerivedType::get(Context, dwarf::DW_TAG_pointer_type, "something",
File, 1, Scope, BaseType, 2, 3, 4, 5, File));
+
+ TempMDDerivedType Temp = N->clone();
+ EXPECT_EQ(N, MDNode::replaceWithUniqued(std::move(Temp)));
}
typedef MetadataTest MDCompositeTypeTest;
Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits,
AlignInBits, OffsetInBits, Flags, Elements, RuntimeLang,
VTableHolder, TemplateParams)->getRawIdentifier());
+
+ TempMDCompositeType Temp = N->clone();
+ EXPECT_EQ(N, MDNode::replaceWithUniqued(std::move(Temp)));
}
typedef MetadataTest MDSubroutineTypeTest;
EXPECT_NE(N, MDSubroutineType::get(Context, Flags + 1, TypeArray));
EXPECT_NE(N, MDSubroutineType::get(Context, Flags,
MDTuple::getDistinct(Context, None)));
+
+ TempMDSubroutineType Temp = N->clone();
+ EXPECT_EQ(N, MDNode::replaceWithUniqued(std::move(Temp)));
}
typedef MetadataTest MDFileTest;
EXPECT_NE(N, MDFile::get(Context, "other", Directory));
EXPECT_NE(N, MDFile::get(Context, Filename, "other"));
+
+ TempMDFile Temp = N->clone();
+ EXPECT_EQ(N, MDNode::replaceWithUniqued(std::move(Temp)));
}
typedef MetadataTest MDCompileUnitTest;
Context, SourceLanguage, File, Producer, IsOptimized, Flags,
RuntimeVersion, SplitDebugFilename, EmissionKind, EnumTypes,
RetainedTypes, Subprograms, GlobalVariables, File));
+
+ TempMDCompileUnit Temp = N->clone();
+ EXPECT_EQ(N, MDNode::replaceWithUniqued(std::move(Temp)));
}
typedef MetadataTest MDSubprogramTest;
ContainingType, Virtuality, VirtualIndex,
Flags, IsOptimized, Function, TemplateParams,
Declaration, Type));
+
+ TempMDSubprogram Temp = N->clone();
+ EXPECT_EQ(N, MDNode::replaceWithUniqued(std::move(Temp)));
}
typedef MetadataTest MDLexicalBlockTest;
EXPECT_NE(N, MDLexicalBlock::get(Context, Scope, Scope, Line, Column));
EXPECT_NE(N, MDLexicalBlock::get(Context, Scope, File, Line + 1, Column));
EXPECT_NE(N, MDLexicalBlock::get(Context, Scope, File, Line, Column + 1));
+
+ TempMDLexicalBlock Temp = N->clone();
+ EXPECT_EQ(N, MDNode::replaceWithUniqued(std::move(Temp)));
}
typedef MetadataTest MDLexicalBlockFileTest;
EXPECT_NE(N, MDLexicalBlockFile::get(Context, Scope, Scope, Discriminator));
EXPECT_NE(N,
MDLexicalBlockFile::get(Context, Scope, File, Discriminator + 1));
+
+ TempMDLexicalBlockFile Temp = N->clone();
+ EXPECT_EQ(N, MDNode::replaceWithUniqued(std::move(Temp)));
}
typedef MetadataTest MDNamespaceTest;
EXPECT_NE(N, MDNamespace::get(Context, Scope, Scope, Name, Line));
EXPECT_NE(N, MDNamespace::get(Context, Scope, File, "other", Line));
EXPECT_NE(N, MDNamespace::get(Context, Scope, File, Name, Line + 1));
+
+ TempMDNamespace Temp = N->clone();
+ EXPECT_EQ(N, MDNode::replaceWithUniqued(std::move(Temp)));
}
typedef MetadataTest MDTemplateTypeParameterTest;
EXPECT_NE(N, MDTemplateTypeParameter::get(Context, Type, Name, Type));
EXPECT_NE(N, MDTemplateTypeParameter::get(Context, Scope, "other", Type));
EXPECT_NE(N, MDTemplateTypeParameter::get(Context, Scope, Name, Scope));
+
+ TempMDTemplateTypeParameter Temp = N->clone();
+ EXPECT_EQ(N, MDNode::replaceWithUniqued(std::move(Temp)));
}
typedef MetadataTest MDTemplateValueParameterTest;
Value));
EXPECT_NE(
N, MDTemplateValueParameter::get(Context, Tag, Scope, Name, Type, Scope));
+
+ TempMDTemplateValueParameter Temp = N->clone();
+ EXPECT_EQ(N, MDNode::replaceWithUniqued(std::move(Temp)));
}
typedef MetadataTest MDGlobalVariableTest;
EXPECT_NE(N, MDGlobalVariable::get(Context, Scope, Name, LinkageName, File,
Line, Type, IsLocalToUnit, IsDefinition,
Variable, Type));
+
+ TempMDGlobalVariable Temp = N->clone();
+ EXPECT_EQ(N, MDNode::replaceWithUniqued(std::move(Temp)));
}
typedef MetadataTest MDLocalVariableTest;
Arg, ~Flags, InlinedAt));
EXPECT_NE(N, MDLocalVariable::get(Context, Tag, Scope, Name, File, Line, Type,
Arg, Flags, Scope));
+
+ TempMDLocalVariable Temp = N->clone();
+ EXPECT_EQ(N, MDNode::replaceWithUniqued(std::move(Temp)));
}
typedef MetadataTest MDExpressionTest;
EXPECT_EQ(9u, N->getElement(2));
EXPECT_EQ(78u, N->getElement(3));
EXPECT_EQ(0u, N->getElement(4));
+
+ TempMDExpression Temp = N->clone();
+ EXPECT_EQ(N, MDNode::replaceWithUniqued(std::move(Temp)));
}
TEST_F(MDExpressionTest, isValid) {
SetterName, Attributes + 1, Type));
EXPECT_NE(N, MDObjCProperty::get(Context, Name, File, Line, GetterName,
SetterName, Attributes, File));
+
+ TempMDObjCProperty Temp = N->clone();
+ EXPECT_EQ(N, MDNode::replaceWithUniqued(std::move(Temp)));
}
typedef MetadataTest MDImportedEntityTest;
MDImportedEntity::get(Context, Tag, Scope, Entity, Line + 1, Name));
EXPECT_NE(N,
MDImportedEntity::get(Context, Tag, Scope, Entity, Line, "other"));
+
+ TempMDImportedEntity Temp = N->clone();
+ EXPECT_EQ(N, MDNode::replaceWithUniqued(std::move(Temp)));
}
typedef MetadataTest MetadataAsValueTest;