|
reference, declaration → definition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced
|
References
unittests/IR/MetadataTest.cpp 66 MetadataTest() : M("test", Context), Counter(0) {}
73 MDNode *getNode() { return MDNode::get(Context, None); }
74 MDNode *getNode(Metadata *MD) { return MDNode::get(Context, MD); }
77 return MDNode::get(Context, MDs);
80 MDTuple *getTuple() { return MDTuple::getDistinct(Context, None); }
82 return DISubroutineType::getDistinct(Context, DINode::FlagZero, 0,
87 Context, nullptr, "", "", nullptr, 0, nullptr, 0, nullptr, 0, 0,
91 return DIFile::getDistinct(Context, "file.c", "/path/to/dir");
95 Context, 1, getFile(), "clang", false, "-g", 2, "",
101 return DIBasicType::get(Context, dwarf::DW_TAG_unspecified_type, Name);
105 Context, dwarf::DW_TAG_pointer_type, "", nullptr, 0, nullptr,
109 return ConstantInt::get(Type::getInt32Ty(Context), Counter++);
116 Context, dwarf::DW_TAG_structure_type, "", nullptr, 0, nullptr, nullptr,
121 FunctionType::get(Type::getVoidTy(Context), None, false),
131 MDString *s1 = MDString::get(Context, StringRef(&x[0], 3));
133 MDString *s2 = MDString::get(Context, StringRef(&x[0], 3));
143 MDString *s1 = MDString::get(Context, StringRef(&x[0], 3));
144 MDString *s2 = MDString::get(Context, StringRef(&y[0], 3));
151 MDString *s = MDString::get(Context, StringRef(&str[0], 13));
163 MDString *s = MDString::get(Context, StringRef(str+0, 5));
177 MDString *s1 = MDString::get(Context, StringRef(&x[0], 3));
178 MDString *s2 = MDString::get(Context, StringRef(&y[0], 3));
180 ConstantAsMetadata::get(ConstantInt::get(Context, APInt(8, 0)));
187 MDNode *n1 = MDNode::get(Context, V);
189 MDNode *n2 = MDNode::get(Context, c1);
191 MDNode *n3 = MDNode::get(Context, V);
192 MDNode *n4 = MDNode::getIfExists(Context, V);
193 MDNode *n5 = MDNode::getIfExists(Context, c1);
194 MDNode *n6 = MDNode::getIfExists(Context, c2);
211 Constant *C = ConstantInt::get(Type::getInt32Ty(Context), 1);
212 Instruction *I = new BitCastInst(C, Type::getInt32Ty(Context));
215 MDNode *n = MDNode::get(Context, V);
227 auto Temp = MDNode::getTemporary(Context, None);
229 MDNode *Self = MDNode::get(Context, Args);
236 MDNode *Ref1 = MDNode::get(Context, Args);
237 MDNode *Ref2 = MDNode::get(Context, Args);
245 auto Temp = MDNode::getTemporary(Context, None);
246 Metadata *Args[] = {Temp.get(), MDNode::get(Context, None)};
247 MDNode *Self = MDNode::get(Context, Args);
254 MDNode *Ref1 = MDNode::get(Context, Args);
255 MDNode *Ref2 = MDNode::get(Context, Args);
262 Constant *C = ConstantInt::get(Type::getInt32Ty(Context), 7);
263 MDString *S = MDString::get(Context, "foo");
269 MDNode *N = MDNode::get(Context, Args);
306 TempMDNode Temp = MDNode::getTemporary(Context, Arg);
308 Module M("test", Context);
321 Constant *C = ConstantInt::get(Type::getInt32Ty(Context), 7);
322 MDString *S = MDString::get(Context, "foo");
328 MDNode *N = MDNode::get(Context, Args);
329 Module M("test", Context);
347 Module M("test", Context);
348 auto *FTy = FunctionType::get(Type::getVoidTy(Context), false);
351 auto *BB0 = BasicBlock::Create(Context, "entry", F0);
352 auto *BB1 = BasicBlock::Create(Context, "entry", F1);
353 auto *R0 = ReturnInst::Create(Context, BB0);
354 auto *R1 = ReturnInst::Create(Context, BB1);
355 auto *N0 = MDNode::getDistinct(Context, None);
356 auto *N1 = MDNode::getDistinct(Context, None);
369 Module M("test", Context);
372 Function::Create(FunctionType::get(Type::getVoidTy(Context),
373 Type::getMetadataTy(Context), false),
376 auto *FTy = FunctionType::get(Type::getVoidTy(Context), false);
379 auto *BB0 = BasicBlock::Create(Context, "entry", F0);
380 auto *BB1 = BasicBlock::Create(Context, "entry", F1);
381 auto *N0 = MDNode::getDistinct(Context, None);
382 auto *N1 = MDNode::getDistinct(Context, None);
383 auto *MAV0 = MetadataAsValue::get(Context, N0);
384 auto *MAV1 = MetadataAsValue::get(Context, N1);
405 Module M("test", Context);
407 auto *FTy = FunctionType::get(Type::getVoidTy(Context), false);
410 auto *BB0 = BasicBlock::Create(Context, "entry", F0);
415 auto *R0 = ReturnInst::Create(Context, BB0);
416 auto *N0 = MDNode::getDistinct(Context, None);
428 MDNode *Empty = MDNode::get(Context, None);
432 MDNode *N = MDNode::get(Context, Ops);
441 MDNode *NullOp = MDNode::get(Context, Ops);
448 MDNode *Empty = MDNode::get(Context, None);
454 MDNode *Wrapped1 = MDNode::get(Context, Wrapped1Ops);
461 MDNode *Wrapped2 = MDNode::get(Context, Wrapped2Ops);
475 TempMDTuple T = MDTuple::getTemporary(Context, None);
479 MDTuple *N = MDTuple::get(Context, Ops);
485 ASSERT_EQ(N, MDTuple::get(Context, NullOps));
490 Type *Ty = Type::getInt1PtrTy(Context);
497 MDTuple *N = MDTuple::get(Context, Ops);
504 ASSERT_NE(N, MDTuple::get(Context, NullOps));
509 MDNode *Empty = MDNode::get(Context, None);
512 ASSERT_EQ(Empty, MDNode::get(Context, None));
515 MDNode *Distinct1 = MDNode::getDistinct(Context, None);
516 MDNode *Distinct2 = MDNode::getDistinct(Context, None);
524 ASSERT_EQ(Empty, MDNode::get(Context, None));
528 MDNode *U = MDTuple::get(Context, None);
529 MDNode *D = MDTuple::getDistinct(Context, None);
530 auto T = MDTuple::getTemporary(Context, None);
537 MDNode *U = MDTuple::get(Context, None);
538 MDNode *D = MDTuple::getDistinct(Context, None);
539 auto T = MDTuple::getTemporary(Context, None);
546 MDNode *U = MDTuple::get(Context, None);
547 MDNode *D = MDTuple::getDistinct(Context, None);
548 auto T = MDTuple::getTemporary(Context, None);
556 auto Temp = MDTuple::getTemporary(Context, None);
561 MDNode *Distinct = MDNode::getDistinct(Context, Ops);
566 MDNode *Empty = MDNode::get(Context, None);
573 MDNode *N0 = MDNode::get(Context, None);
576 auto Temp3 = MDTuple::getTemporary(Context, None);
578 MDNode *N1 = MDNode::get(Context, Ops1);
582 MDNode *N2 = MDNode::get(Context, Ops2);
586 MDNode *N3 = MDNode::get(Context, Ops3);
591 MDNode *N4 = MDNode::get(Context, Ops4);
605 MDNode *N5 = MDNode::getDistinct(Context, Ops5);
607 MDNode *N6 = MDNode::getDistinct(Context, Ops6);
640 auto Temp = MDTuple::getTemporary(Context, None);
643 MDNode *Empty = MDTuple::get(Context, ArrayRef<Metadata *>());
644 MDNode *N = MDTuple::get(Context, Ops);
661 auto *Empty = MDTuple::get(Context, None);
665 auto Temp = MDTuple::getTemporary(Context, Ops);
677 auto Temp = MDTuple::getTemporary(Context, Ops);
687 auto Unresolved = MDTuple::getTemporary(Context, None);
689 auto Temp = MDTuple::getTemporary(Context, Ops);
709 MDTuple *Op = MDTuple::getTemporary(Context, None).release();
714 MDTuple *N = MDTuple::getTemporary(Context, Ops).release();
729 Type *Ty = Type::getInt1PtrTy(Context);
736 MDTuple *N = MDTuple::getTemporary(Context, Ops).release();
747 ASSERT_NE(N, MDTuple::get(Context, NullOps));
752 Type *Ty = Type::getInt1PtrTy(Context);
759 MDTuple *N = MDTuple::getTemporary(Context, Ops).release();
771 ASSERT_EQ(N, MDTuple::get(Context, NullOps));
776 auto *Empty = MDTuple::get(Context, None);
778 auto Temp = MDTuple::getTemporary(Context, Ops);
789 auto Unresolved = MDTuple::getTemporary(Context, None);
791 auto Temp = MDTuple::getTemporary(Context, Ops);
808 auto Temp = MDTuple::getTemporary(Context, Ops);
812 auto *U = MDTuple::get(Context, T);
828 EXPECT_EQ(U, MDTuple::get(Context, N));
833 EXPECT_EQ(U, MDNode::replaceWithPermanent(MDTuple::getTemporary(Context, N)));
837 auto Temp2 = MDTuple::getTemporary(Context, U);
848 auto Temp = MDTuple::getTemporary(Context, None);
860 DILocation *L = DILocation::get(Context, 2, 7, N);
866 DILocation *L = DILocation::get(Context, UINT32_MAX, U16 - 1, N);
871 DILocation *L = DILocation::get(Context, UINT32_MAX, U16, N);
876 DILocation *L = DILocation::get(Context, UINT32_MAX, U16 + 1, N);
884 DIScope *S = DILexicalBlock::get(Context, N, getFile(), 3, 4);
888 auto *A = DILocation::get(Context, 2, 7, N);
889 auto *B = DILocation::get(Context, 2, 7, N);
898 auto *A = DILocation::get(Context, 2, 7, N);
899 auto *B = DILocation::get(Context, 2, 7, S);
908 auto *A = DILocation::get(Context, 1, 6, N);
909 auto *B = DILocation::get(Context, 2, 7, N);
918 auto *A = DILocation::get(Context, 1, 6, N);
919 auto *B = DILocation::get(Context, 2, 7, S);
929 auto *SP1 = DISubprogram::getDistinct(Context, F, "a", "a", F, 0, nullptr,
932 auto *SP2 = DISubprogram::getDistinct(Context, F, "b", "b", F, 0, nullptr,
936 auto *I = DILocation::get(Context, 2, 7, N);
937 auto *A = DILocation::get(Context, 1, 6, SP1, I);
938 auto *B = DILocation::get(Context, 2, 7, SP2, I);
948 auto *I = DILocation::get(Context, 2, 7, N);
949 auto *A = DILocation::get(Context, 1, 6, S, I);
950 auto *B = DILocation::get(Context, 2, 7, getSubprogram());
962 DILocation *L0 = DILocation::getDistinct(Context, 2, 7, N);
964 DILocation *L1 = DILocation::get(Context, 2, 7, N);
966 EXPECT_EQ(L1, DILocation::get(Context, 2, 7, N));
970 MDNode *N = MDNode::get(Context, None);
971 auto L = DILocation::getTemporary(Context, 2, 7, N);
977 MDNode *N = MDNode::get(Context, None);
978 auto L = DILocation::getTemporary(Context, 2, 7, N);
1049 auto L1 = DILocation::get(Context, 1, 2, getSubprogram());
1095 auto *Empty = MDNode::get(Context, None);
1097 auto *N = GenericDINode::get(Context, 15, Header, Ops1);
1101 EXPECT_EQ(MDString::get(Context, Header), N->getOperand(0));
1107 EXPECT_EQ(N, GenericDINode::get(Context, 15, Header, Ops1));
1116 EXPECT_EQ(N, GenericDINode::get(Context, 15, Header, Ops2));
1123 EXPECT_EQ(N, GenericDINode::get(Context, 15, Header, Ops1));
1131 auto *N = GenericDINode::get(Context, 15, StringRef(), None);
1139 auto *N = DISubrange::get(Context, 5, 7);
1146 EXPECT_EQ(N, DISubrange::get(Context, 5, 7));
1147 EXPECT_EQ(DISubrange::get(Context, 5, 0), DISubrange::get(Context, 5));
1147 EXPECT_EQ(DISubrange::get(Context, 5, 0), DISubrange::get(Context, 5));
1154 auto *N = DISubrange::get(Context, -1, 0);
1161 EXPECT_EQ(N, DISubrange::get(Context, -1, 0));
1169 auto *VlaExpr = DILocalVariable::get(Context, Scope, "vla_expr", File, 8,
1172 auto *N = DISubrange::get(Context, VlaExpr, 0);
1180 EXPECT_EQ(N, DISubrange::get(Context, VlaExpr, 0));
1186 auto *N = DIEnumerator::get(Context, 7, false, "name");
1191 EXPECT_EQ(N, DIEnumerator::get(Context, 7, false, "name"));
1193 EXPECT_NE(N, DIEnumerator::get(Context, 7, true, "name"));
1194 EXPECT_NE(N, DIEnumerator::get(Context, 8, false, "name"));
1195 EXPECT_NE(N, DIEnumerator::get(Context, 7, false, "nam"));
1205 DIBasicType::get(Context, dwarf::DW_TAG_base_type, "special", 33, 26, 7,
1214 EXPECT_EQ(N, DIBasicType::get(Context, dwarf::DW_TAG_base_type, "special", 33,
1217 EXPECT_NE(N, DIBasicType::get(Context, dwarf::DW_TAG_unspecified_type,
1220 DIBasicType::get(Context, dwarf::DW_TAG_base_type, "s", 33, 26, 7,
1222 EXPECT_NE(N, DIBasicType::get(Context, dwarf::DW_TAG_base_type, "special", 32,
1224 EXPECT_NE(N, DIBasicType::get(Context, dwarf::DW_TAG_base_type, "special", 33,
1226 EXPECT_NE(N, DIBasicType::get(Context, dwarf::DW_TAG_base_type, "special", 33,
1228 EXPECT_NE(N, DIBasicType::get(Context, dwarf::DW_TAG_base_type, "special", 33,
1230 EXPECT_NE(N, DIBasicType::get(Context, dwarf::DW_TAG_base_type, "special", 33,
1238 auto *N = DIBasicType::get(Context, dwarf::DW_TAG_base_type, "special",
1246 DIBasicType::get(Context, dwarf::DW_TAG_unspecified_type, "unspecified");
1260 DIType *N = DIBasicType::get(Context, dwarf::DW_TAG_base_type, "int", 32, 32,
1270 Metadata *Types = MDTuple::get(Context, TypesOps);
1273 DISubroutineType::getDistinct(Context, DINode::FlagZero, 0, Types);
1280 DISubroutineType::getTemporary(Context, DINode::FlagZero, 0, Types);
1299 DIDerivedType::get(Context, dwarf::DW_TAG_pointer_type, "something", File,
1314 EXPECT_EQ(N, DIDerivedType::get(Context, dwarf::DW_TAG_pointer_type,
1318 EXPECT_NE(N, DIDerivedType::get(Context, dwarf::DW_TAG_reference_type,
1321 EXPECT_NE(N, DIDerivedType::get(Context, dwarf::DW_TAG_pointer_type, "else",
1324 EXPECT_NE(N, DIDerivedType::get(Context, dwarf::DW_TAG_pointer_type,
1327 EXPECT_NE(N, DIDerivedType::get(Context, dwarf::DW_TAG_pointer_type,
1330 EXPECT_NE(N, DIDerivedType::get(Context, dwarf::DW_TAG_pointer_type,
1335 Context, dwarf::DW_TAG_pointer_type, "something", File, 1,
1338 EXPECT_NE(N, DIDerivedType::get(Context, dwarf::DW_TAG_pointer_type,
1341 EXPECT_NE(N, DIDerivedType::get(Context, dwarf::DW_TAG_pointer_type,
1344 EXPECT_NE(N, DIDerivedType::get(Context, dwarf::DW_TAG_pointer_type,
1347 EXPECT_NE(N, DIDerivedType::get(Context, dwarf::DW_TAG_pointer_type,
1350 EXPECT_NE(N, DIDerivedType::get(Context, dwarf::DW_TAG_pointer_type,
1353 EXPECT_NE(N, DIDerivedType::get(Context, dwarf::DW_TAG_pointer_type,
1369 Context, dwarf::DW_TAG_pointer_type, "something", File, 1, Scope,
1397 auto *N = DICompositeType::get(Context, Tag, Name, File, Line, Scope,
1417 EXPECT_EQ(N, DICompositeType::get(Context, Tag, Name, File, Line, Scope,
1422 EXPECT_NE(N, DICompositeType::get(Context, Tag + 1, Name, File, Line, Scope,
1426 EXPECT_NE(N, DICompositeType::get(Context, Tag, "abc", File, Line, Scope,
1430 EXPECT_NE(N, DICompositeType::get(Context, Tag, Name, getFile(), Line, Scope,
1434 EXPECT_NE(N, DICompositeType::get(Context, Tag, Name, File, Line + 1, Scope,
1439 Context, Tag, Name, File, Line, getSubprogram(), BaseType,
1443 Context, Tag, Name, File, Line, Scope, getBasicType("other"),
1446 EXPECT_NE(N, DICompositeType::get(Context, Tag, Name, File, Line, Scope,
1450 EXPECT_NE(N, DICompositeType::get(Context, Tag, Name, File, Line, Scope,
1455 Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits,
1460 Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits,
1464 Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits,
1468 Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits,
1472 Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits,
1475 EXPECT_NE(N, DICompositeType::get(Context, Tag, Name, File, Line, Scope,
1479 EXPECT_NE(N, DICompositeType::get(Context, Tag, Name, File, Line, Scope,
1485 EXPECT_FALSE(DICompositeType::get(Context, Tag, Name, File, Line, Scope,
1490 EXPECT_FALSE(DICompositeType::get(Context, Tag, Name, File, Line, Scope,
1517 auto *N = DICompositeType::get(Context, Tag, Name, File, Line, Scope,
1541 Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits, AlignInBits,
1544 auto *Elements = MDTuple::getDistinct(Context, None);
1563 auto *TemplateParams = MDTuple::getDistinct(Context, None);
1590 Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits, AlignInBits,
1596 Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits, AlignInBits,
1600 Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits, AlignInBits,
1604 Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits, AlignInBits,
1623 auto *N = DISubroutineType::get(Context, Flags, 0, TypeArray);
1627 EXPECT_EQ(N, DISubroutineType::get(Context, Flags, 0, TypeArray));
1629 EXPECT_NE(N, DISubroutineType::get(Context, FlagsPOne, 0, TypeArray));
1630 EXPECT_NE(N, DISubroutineType::get(Context, Flags, 0, getTuple()));
1634 Context, Flags, dwarf::DW_CC_BORLAND_msfastcall, TypeArray);
1635 auto *Std = DISubroutineType::get(Context, Flags,
1638 DISubroutineType::get(Context, Flags,
1641 Context, Flags, dwarf::DW_CC_BORLAND_stdcall, TypeArray));
1665 auto *N = DIFile::get(Context, Filename, Directory, Checksum, Source);
1672 EXPECT_EQ(N, DIFile::get(Context, Filename, Directory, Checksum, Source));
1674 EXPECT_NE(N, DIFile::get(Context, "other", Directory, Checksum, Source));
1675 EXPECT_NE(N, DIFile::get(Context, Filename, "other", Checksum, Source));
1678 N, DIFile::get(Context, Filename, Directory, OtherChecksum));
1680 EXPECT_NE(N, DIFile::get(Context, Filename, Directory, Checksum, OtherSource));
1681 EXPECT_NE(N, DIFile::get(Context, Filename, Directory, Checksum));
1682 EXPECT_NE(N, DIFile::get(Context, Filename, Directory));
1690 DIScope *N = DIFile::get(Context, "file", "dir");
1712 Context, SourceLanguage, File, Producer, IsOptimized, Flags,
1765 MDTuple *EnumTypes = MDTuple::getDistinct(Context, None);
1766 MDTuple *RetainedTypes = MDTuple::getDistinct(Context, None);
1767 MDTuple *ImportedEntities = MDTuple::getDistinct(Context, None);
1770 Context, SourceLanguage, File, Producer, IsOptimized, Flags,
1775 auto *GlobalVariables = MDTuple::getDistinct(Context, None);
1782 auto *Macros = MDTuple::getDistinct(Context, None);
1820 Context, Scope, Name, LinkageName, File, Line, Type, ScopeLine,
1845 EXPECT_EQ(N, DISubprogram::get(Context, Scope, Name, LinkageName, File, Line,
1851 EXPECT_NE(N, DISubprogram::get(Context, getCompositeType(), Name, LinkageName,
1856 EXPECT_NE(N, DISubprogram::get(Context, Scope, "other", LinkageName, File,
1861 EXPECT_NE(N, DISubprogram::get(Context, Scope, Name, "other", File, Line,
1866 EXPECT_NE(N, DISubprogram::get(Context, Scope, Name, LinkageName, getFile(),
1871 EXPECT_NE(N, DISubprogram::get(Context, Scope, Name, LinkageName, File,
1876 EXPECT_NE(N, DISubprogram::get(Context, Scope, Name, LinkageName, File, Line,
1882 Context, Scope, Name, LinkageName, File, Line, Type,
1887 Context, Scope, Name, LinkageName, File, Line, Type,
1891 EXPECT_NE(N, DISubprogram::get(Context, Scope, Name, LinkageName, File, Line,
1896 EXPECT_NE(N, DISubprogram::get(Context, Scope, Name, LinkageName, File, Line,
1902 Context, Scope, Name, LinkageName, File, Line, Type,
1906 EXPECT_NE(N, DISubprogram::get(Context, Scope, Name, LinkageName, File, Line,
1912 Context, Scope, Name, LinkageName, File, Line, Type,
1916 EXPECT_NE(N, DISubprogram::get(Context, Scope, Name, LinkageName, File, Line,
1922 DISubprogram::get(Context, Scope, Name, LinkageName, File, Line,
1926 EXPECT_NE(N, DISubprogram::get(Context, Scope, Name, LinkageName, File, Line,
1931 EXPECT_NE(N, DISubprogram::get(Context, Scope, Name, LinkageName, File, Line,
1935 EXPECT_NE(N, DISubprogram::get(Context, Scope, Name, LinkageName, File, Line,
1953 auto *N = DILexicalBlock::get(Context, Scope, File, Line, Column);
1960 EXPECT_EQ(N, DILexicalBlock::get(Context, Scope, File, Line, Column));
1963 DILexicalBlock::get(Context, getSubprogram(), File, Line, Column));
1964 EXPECT_NE(N, DILexicalBlock::get(Context, Scope, getFile(), Line, Column));
1965 EXPECT_NE(N, DILexicalBlock::get(Context, Scope, File, Line + 1, Column));
1966 EXPECT_NE(N, DILexicalBlock::get(Context, Scope, File, Line, Column + 1));
1976 auto *LB = DILexicalBlock::get(Context, SP, F, 2, 7);
1982 auto *LB = DILexicalBlock::get(Context, SP, F, UINT32_MAX, U16 - 1);
1987 auto *LB = DILexicalBlock::get(Context, SP, F, UINT32_MAX, U16);
1992 auto *LB = DILexicalBlock::get(Context, SP, F, UINT32_MAX, U16 + 1);
2005 auto *N = DILexicalBlockFile::get(Context, Scope, File, Discriminator);
2011 EXPECT_EQ(N, DILexicalBlockFile::get(Context, Scope, File, Discriminator));
2013 EXPECT_NE(N, DILexicalBlockFile::get(Context, getSubprogram(), File,
2016 DILexicalBlockFile::get(Context, Scope, getFile(), Discriminator));
2018 DILexicalBlockFile::get(Context, Scope, File, Discriminator + 1));
2031 auto *N = DINamespace::get(Context, Scope, Name, ExportSymbols);
2036 EXPECT_EQ(N, DINamespace::get(Context, Scope, Name, ExportSymbols));
2037 EXPECT_NE(N, DINamespace::get(Context, getFile(), Name, ExportSymbols));
2038 EXPECT_NE(N, DINamespace::get(Context, Scope, "other", ExportSymbols));
2039 EXPECT_NE(N, DINamespace::get(Context, Scope, Name, !ExportSymbols));
2054 auto *N = DIModule::get(Context, Scope, Name, ConfigMacro, Includes, Sysroot);
2062 EXPECT_EQ(N, DIModule::get(Context, Scope, Name,
2064 EXPECT_NE(N, DIModule::get(Context, getFile(), Name,
2066 EXPECT_NE(N, DIModule::get(Context, Scope, "other",
2068 EXPECT_NE(N, DIModule::get(Context, Scope, Name,
2070 EXPECT_NE(N, DIModule::get(Context, Scope, Name,
2072 EXPECT_NE(N, DIModule::get(Context, Scope, Name,
2085 auto *N = DITemplateTypeParameter::get(Context, Name, Type);
2090 EXPECT_EQ(N, DITemplateTypeParameter::get(Context, Name, Type));
2092 EXPECT_NE(N, DITemplateTypeParameter::get(Context, "other", Type));
2094 DITemplateTypeParameter::get(Context, Name, getBasicType("other")));
2108 auto *N = DITemplateValueParameter::get(Context, Tag, Name, Type, Value);
2113 EXPECT_EQ(N, DITemplateValueParameter::get(Context, Tag, Name, Type, Value));
2116 Context, dwarf::DW_TAG_GNU_template_template_param, Name,
2119 DITemplateValueParameter::get(Context, Tag, "other", Type, Value));
2120 EXPECT_NE(N, DITemplateValueParameter::get(Context, Tag, Name,
2122 EXPECT_NE(N, DITemplateValueParameter::get(Context, Tag, Name, Type,
2147 Context, Scope, Name, LinkageName, File, Line, Type, IsLocalToUnit,
2162 EXPECT_EQ(N, DIGlobalVariable::get(Context, Scope, Name, LinkageName, File,
2168 Context, getSubprogram(), Name, LinkageName, File, Line,
2171 EXPECT_NE(N, DIGlobalVariable::get(Context, Scope, "other", LinkageName, File,
2175 EXPECT_NE(N, DIGlobalVariable::get(Context, Scope, Name, "other", File, Line,
2179 EXPECT_NE(N, DIGlobalVariable::get(Context, Scope, Name, LinkageName,
2183 EXPECT_NE(N, DIGlobalVariable::get(Context, Scope, Name, LinkageName, File,
2187 EXPECT_NE(N, DIGlobalVariable::get(Context, Scope, Name, LinkageName, File,
2191 EXPECT_NE(N, DIGlobalVariable::get(Context, Scope, Name, LinkageName, File,
2195 EXPECT_NE(N, DIGlobalVariable::get(Context, Scope, Name, LinkageName, File,
2199 EXPECT_NE(N, DIGlobalVariable::get(Context, Scope, Name, LinkageName, File,
2203 EXPECT_NE(N, DIGlobalVariable::get(Context, Scope, Name, LinkageName, File,
2207 EXPECT_NE(N, DIGlobalVariable::get(Context, Scope, Name, LinkageName, File,
2228 auto *Expr = DIExpression::get(Context, {1, 2});
2229 auto *Expr2 = DIExpression::get(Context, {1, 2, 3});
2235 Context, Scope, Name, LinkageName, File, Line, Type, IsLocalToUnit,
2238 Context, Scope, "other", LinkageName, File, Line, Type, IsLocalToUnit,
2240 auto *N = DIGlobalVariableExpression::get(Context, Var, Expr);
2244 EXPECT_EQ(N, DIGlobalVariableExpression::get(Context, Var, Expr));
2245 EXPECT_NE(N, DIGlobalVariableExpression::get(Context, Var2, Expr));
2246 EXPECT_NE(N, DIGlobalVariableExpression::get(Context, Var, Expr2));
2265 DILocalVariable::get(Context, Scope, Name, File, Line, Type, Arg, Flags,
2276 EXPECT_EQ(N, DILocalVariable::get(Context, Scope, Name, File, Line, Type, Arg,
2280 DILocalVariable::get(Context, Scope, Name, File, Line, Type, 0, Flags,
2282 EXPECT_NE(N, DILocalVariable::get(Context, getSubprogram(), Name, File, Line,
2284 EXPECT_NE(N, DILocalVariable::get(Context, Scope, "other", File, Line, Type,
2286 EXPECT_NE(N, DILocalVariable::get(Context, Scope, Name, getFile(), Line, Type,
2288 EXPECT_NE(N, DILocalVariable::get(Context, Scope, Name, File, Line + 1, Type,
2290 EXPECT_NE(N, DILocalVariable::get(Context, Scope, Name, File, Line,
2292 EXPECT_NE(N, DILocalVariable::get(Context, Scope, Name, File, Line, Type,
2294 EXPECT_NE(N, DILocalVariable::get(Context, Scope, Name, File, Line, Type,
2302 EXPECT_EQ(255u, DILocalVariable::get(Context, getSubprogram(), "", getFile(),
2305 EXPECT_EQ(256u, DILocalVariable::get(Context, getSubprogram(), "", getFile(),
2308 EXPECT_EQ(257u, DILocalVariable::get(Context, getSubprogram(), "", getFile(),
2312 EXPECT_EQ(Max, DILocalVariable::get(Context, getSubprogram(), "", getFile(),
2321 auto *N = DIExpression::get(Context, Elements);
2323 EXPECT_EQ(N, DIExpression::get(Context, Elements));
2337 auto *N0 = DIExpression::get(Context, Elts0);
2348 auto *N1 = DIExpression::get(Context, Elts1);
2371 EXPECT_TRUE(DIExpression::get(Context, None));
2408 auto *N = DIObjCProperty::get(Context, Name, File, Line, GetterName,
2419 EXPECT_EQ(N, DIObjCProperty::get(Context, Name, File, Line, GetterName,
2422 EXPECT_NE(N, DIObjCProperty::get(Context, "other", File, Line, GetterName,
2424 EXPECT_NE(N, DIObjCProperty::get(Context, Name, getFile(), Line, GetterName,
2426 EXPECT_NE(N, DIObjCProperty::get(Context, Name, File, Line + 1, GetterName,
2428 EXPECT_NE(N, DIObjCProperty::get(Context, Name, File, Line, "other",
2430 EXPECT_NE(N, DIObjCProperty::get(Context, Name, File, Line, GetterName,
2432 EXPECT_NE(N, DIObjCProperty::get(Context, Name, File, Line, GetterName,
2434 EXPECT_NE(N, DIObjCProperty::get(Context, Name, File, Line, GetterName,
2453 DIImportedEntity::get(Context, Tag, Scope, Entity, File, Line, Name);
2462 N, DIImportedEntity::get(Context, Tag, Scope, Entity, File, Line, Name));
2465 DIImportedEntity::get(Context, dwarf::DW_TAG_imported_declaration,
2467 EXPECT_NE(N, DIImportedEntity::get(Context, Tag, getSubprogram(), Entity,
2469 EXPECT_NE(N, DIImportedEntity::get(Context, Tag, Scope, getCompositeType(),
2471 EXPECT_NE(N, DIImportedEntity::get(Context, Tag, Scope, Entity, nullptr, Line,
2473 EXPECT_NE(N, DIImportedEntity::get(Context, Tag, Scope, Entity, File,
2475 EXPECT_NE(N, DIImportedEntity::get(Context, Tag, Scope, Entity, File, Line,
2485 MDNode *N = MDNode::get(Context, None);
2486 auto *V = MetadataAsValue::get(Context, N);
2490 auto *V2 = MetadataAsValue::get(Context, N);
2495 MDNode *N = MDNode::get(Context, None);
2497 MDNode *N2 = MDNode::get(Context, Ops);
2498 auto *V = MetadataAsValue::get(Context, N2);
2502 auto *V2 = MetadataAsValue::get(Context, N2);
2505 auto *V3 = MetadataAsValue::get(Context, N);
2512 auto *C = ConstantInt::getTrue(Context);
2515 auto *N = MDNode::get(Context, Ops);
2517 auto *V = MetadataAsValue::get(Context, MD);
2521 auto *V2 = MetadataAsValue::get(Context, N);
2529 Type *Ty = Type::getInt1PtrTy(Context);
2545 ConstantAsMetadata::get(ConstantInt::get(Context, APInt(8, 0)));
2547 auto Temp1 = MDTuple::getTemporary(Context, None);
2548 auto Temp2 = MDTuple::getTemporary(Context, {CI});
2549 auto *N = MDTuple::get(Context, {Temp1.get()});
2562 ConstantAsMetadata::get(ConstantInt::get(Context, APInt(8, 0)));
2565 auto Temp = MDTuple::getTemporary(Context, None);
2571 auto *N1 = MDTuple::get(Context, Ops1);
2572 auto *N2 = MDTuple::get(Context, Ops2);
2590 Type *Ty = Type::getInt1PtrTy(Context);
2607 Type *Ty = Type::getInt1PtrTy(Context);
2716 EXPECT_EQ(Context.getMDKindID("other1"), MDs[2].first);
2717 EXPECT_EQ(Context.getMDKindID("other2"), MDs[3].first);
2741 (void)new UnreachableInst(Context, BasicBlock::Create(Context, "bb", F));
2741 (void)new UnreachableInst(Context, BasicBlock::Create(Context, "bb", F));
2788 auto *D = MDTuple::getDistinct(Context, Ops);
2794 auto *N0 = MDTuple::get(Context, None);
2795 auto *N1 = MDTuple::get(Context, N0);
2806 DistinctMDOperandPlaceholder(7).replaceUseWith(MDTuple::get(Context, None));