Lines Matching refs:Context
30 LLVMContext Context; in TEST() local
31 ContextAndReplaceableUses CRU(Context); in TEST()
32 EXPECT_EQ(&Context, &CRU.getContext()); in TEST()
38 LLVMContext Context; in TEST() local
39 ContextAndReplaceableUses CRU(std::make_unique<ReplaceableMetadataImpl>(Context)); in TEST()
40 EXPECT_EQ(&Context, &CRU.getContext()); in TEST()
46 LLVMContext Context; in TEST() local
47 ContextAndReplaceableUses CRU(Context); in TEST()
48 CRU.makeReplaceable(std::make_unique<ReplaceableMetadataImpl>(Context)); in TEST()
49 EXPECT_EQ(&Context, &CRU.getContext()); in TEST()
55 LLVMContext Context; in TEST() local
56 auto ReplaceableUses = std::make_unique<ReplaceableMetadataImpl>(Context); in TEST()
60 EXPECT_EQ(&Context, &CRU.getContext()); in TEST()
68 MetadataTest() : M("test", Context), Counter(0) {} in MetadataTest()
71 LLVMContext Context; member in __anond9aefcc70111::MetadataTest
75 MDNode *getNode() { return MDNode::get(Context, None); } in getNode()
76 MDNode *getNode(Metadata *MD) { return MDNode::get(Context, MD); } in getNode()
79 return MDNode::get(Context, MDs); in getNode()
82 MDTuple *getTuple() { return MDTuple::getDistinct(Context, None); } in getTuple()
84 return DISubroutineType::getDistinct(Context, DINode::FlagZero, 0, in getSubroutineType()
89 Context, nullptr, "", "", nullptr, 0, nullptr, 0, nullptr, 0, 0, in getSubprogram()
93 return DIFile::getDistinct(Context, "file.c", "/path/to/dir"); in getFile()
97 Context, 1, getFile(), "clang", false, "-g", 2, "", in getUnit()
103 return DIBasicType::get(Context, dwarf::DW_TAG_unspecified_type, Name); in getBasicType()
107 Context, dwarf::DW_TAG_pointer_type, "", nullptr, 0, nullptr, in getDerivedType()
111 return ConstantInt::get(Type::getInt32Ty(Context), Counter++); in getConstant()
118 Context, dwarf::DW_TAG_structure_type, "", nullptr, 0, nullptr, nullptr, in getCompositeType()
123 FunctionType::get(Type::getVoidTy(Context), None, false), in getFunction()
133 MDString *s1 = MDString::get(Context, StringRef(&x[0], 3)); in TEST_F()
135 MDString *s2 = MDString::get(Context, StringRef(&x[0], 3)); in TEST_F()
145 MDString *s1 = MDString::get(Context, StringRef(&x[0], 3)); in TEST_F()
146 MDString *s2 = MDString::get(Context, StringRef(&y[0], 3)); in TEST_F()
153 MDString *s = MDString::get(Context, StringRef(&str[0], 13)); in TEST_F()
165 MDString *s = MDString::get(Context, StringRef(str+0, 5)); in TEST_F()
179 MDString *s1 = MDString::get(Context, StringRef(&x[0], 3)); in TEST_F()
180 MDString *s2 = MDString::get(Context, StringRef(&y[0], 3)); in TEST_F()
182 ConstantAsMetadata::get(ConstantInt::get(Context, APInt(8, 0))); in TEST_F()
189 MDNode *n1 = MDNode::get(Context, V); in TEST_F()
191 MDNode *n2 = MDNode::get(Context, c1); in TEST_F()
193 MDNode *n3 = MDNode::get(Context, V); in TEST_F()
194 MDNode *n4 = MDNode::getIfExists(Context, V); in TEST_F()
195 MDNode *n5 = MDNode::getIfExists(Context, c1); in TEST_F()
196 MDNode *n6 = MDNode::getIfExists(Context, c2); in TEST_F()
213 Constant *C = ConstantInt::get(Type::getInt32Ty(Context), 1); in TEST_F()
214 Instruction *I = new BitCastInst(C, Type::getInt32Ty(Context)); in TEST_F()
217 MDNode *n = MDNode::get(Context, V); in TEST_F()
229 auto Temp = MDNode::getTemporary(Context, None); in TEST_F()
231 MDNode *Self = MDNode::get(Context, Args); in TEST_F()
238 MDNode *Ref1 = MDNode::get(Context, Args); in TEST_F()
239 MDNode *Ref2 = MDNode::get(Context, Args); in TEST_F()
247 auto Temp = MDNode::getTemporary(Context, None); in TEST_F()
248 Metadata *Args[] = {Temp.get(), MDNode::get(Context, None)}; in TEST_F()
249 MDNode *Self = MDNode::get(Context, Args); in TEST_F()
256 MDNode *Ref1 = MDNode::get(Context, Args); in TEST_F()
257 MDNode *Ref2 = MDNode::get(Context, Args); in TEST_F()
264 Constant *C = ConstantInt::get(Type::getInt32Ty(Context), 7); in TEST_F()
265 MDString *S = MDString::get(Context, "foo"); in TEST_F()
271 MDNode *N = MDNode::get(Context, Args); in TEST_F()
308 TempMDNode Temp = MDNode::getTemporary(Context, Arg); in TEST_F()
310 Module M("test", Context); in TEST_F()
323 Constant *C = ConstantInt::get(Type::getInt32Ty(Context), 7); in TEST_F()
324 MDString *S = MDString::get(Context, "foo"); in TEST_F()
330 MDNode *N = MDNode::get(Context, Args); in TEST_F()
331 Module M("test", Context); in TEST_F()
349 Module M("test", Context); in TEST_F()
350 auto *FTy = FunctionType::get(Type::getVoidTy(Context), false); in TEST_F()
353 auto *BB0 = BasicBlock::Create(Context, "entry", F0); in TEST_F()
354 auto *BB1 = BasicBlock::Create(Context, "entry", F1); in TEST_F()
355 auto *R0 = ReturnInst::Create(Context, BB0); in TEST_F()
356 auto *R1 = ReturnInst::Create(Context, BB1); in TEST_F()
357 auto *N0 = MDNode::getDistinct(Context, None); in TEST_F()
358 auto *N1 = MDNode::getDistinct(Context, None); in TEST_F()
371 Module M("test", Context); in TEST_F()
374 Function::Create(FunctionType::get(Type::getVoidTy(Context), in TEST_F()
375 Type::getMetadataTy(Context), false), in TEST_F()
378 auto *FTy = FunctionType::get(Type::getVoidTy(Context), false); in TEST_F()
381 auto *BB0 = BasicBlock::Create(Context, "entry", F0); in TEST_F()
382 auto *BB1 = BasicBlock::Create(Context, "entry", F1); in TEST_F()
383 auto *N0 = MDNode::getDistinct(Context, None); in TEST_F()
384 auto *N1 = MDNode::getDistinct(Context, None); in TEST_F()
385 auto *MAV0 = MetadataAsValue::get(Context, N0); in TEST_F()
386 auto *MAV1 = MetadataAsValue::get(Context, N1); in TEST_F()
407 Module M("test", Context); in TEST_F()
409 auto *FTy = FunctionType::get(Type::getVoidTy(Context), false); in TEST_F()
412 auto *BB0 = BasicBlock::Create(Context, "entry", F0); in TEST_F()
417 auto *R0 = ReturnInst::Create(Context, BB0); in TEST_F()
418 auto *N0 = MDNode::getDistinct(Context, None); in TEST_F()
433 auto *Var = DILocalVariable::get(Context, Scope, "foo", File, in TEST_F()
462 Context, dwarf::DW_TAG_pointer_type, "", nullptr, 0, nullptr, StructTy, in TEST_F()
464 StructTy->replaceElements(MDTuple::get(Context, PointerTy)); in TEST_F()
466 auto *Var = DILocalVariable::get(Context, Scope, "foo", File, in TEST_F()
491 MDNode *Empty = MDNode::get(Context, None); in TEST_F()
495 MDNode *N = MDNode::get(Context, Ops); in TEST_F()
504 MDNode *NullOp = MDNode::get(Context, Ops); in TEST_F()
511 MDNode *Empty = MDNode::get(Context, None); in TEST_F()
517 MDNode *Wrapped1 = MDNode::get(Context, Wrapped1Ops); in TEST_F()
524 MDNode *Wrapped2 = MDNode::get(Context, Wrapped2Ops); in TEST_F()
538 TempMDTuple T = MDTuple::getTemporary(Context, None); in TEST_F()
542 MDTuple *N = MDTuple::get(Context, Ops); in TEST_F()
548 ASSERT_EQ(N, MDTuple::get(Context, NullOps)); in TEST_F()
553 Type *Ty = Type::getInt1PtrTy(Context); in TEST_F()
560 MDTuple *N = MDTuple::get(Context, Ops); in TEST_F()
567 ASSERT_NE(N, MDTuple::get(Context, NullOps)); in TEST_F()
572 MDNode *Empty = MDNode::get(Context, None); in TEST_F()
575 ASSERT_EQ(Empty, MDNode::get(Context, None)); in TEST_F()
578 MDNode *Distinct1 = MDNode::getDistinct(Context, None); in TEST_F()
579 MDNode *Distinct2 = MDNode::getDistinct(Context, None); in TEST_F()
587 ASSERT_EQ(Empty, MDNode::get(Context, None)); in TEST_F()
591 MDNode *U = MDTuple::get(Context, None); in TEST_F()
592 MDNode *D = MDTuple::getDistinct(Context, None); in TEST_F()
593 auto T = MDTuple::getTemporary(Context, None); in TEST_F()
600 MDNode *U = MDTuple::get(Context, None); in TEST_F()
601 MDNode *D = MDTuple::getDistinct(Context, None); in TEST_F()
602 auto T = MDTuple::getTemporary(Context, None); in TEST_F()
609 MDNode *U = MDTuple::get(Context, None); in TEST_F()
610 MDNode *D = MDTuple::getDistinct(Context, None); in TEST_F()
611 auto T = MDTuple::getTemporary(Context, None); in TEST_F()
619 auto Temp = MDTuple::getTemporary(Context, None); in TEST_F()
624 MDNode *Distinct = MDNode::getDistinct(Context, Ops); in TEST_F()
629 MDNode *Empty = MDNode::get(Context, None); in TEST_F()
636 MDNode *N0 = MDNode::get(Context, None); in TEST_F()
639 auto Temp3 = MDTuple::getTemporary(Context, None); in TEST_F()
641 MDNode *N1 = MDNode::get(Context, Ops1); in TEST_F()
645 MDNode *N2 = MDNode::get(Context, Ops2); in TEST_F()
649 MDNode *N3 = MDNode::get(Context, Ops3); in TEST_F()
654 MDNode *N4 = MDNode::get(Context, Ops4); in TEST_F()
668 MDNode *N5 = MDNode::getDistinct(Context, Ops5); in TEST_F()
670 MDNode *N6 = MDNode::getDistinct(Context, Ops6); in TEST_F()
703 auto Temp = MDTuple::getTemporary(Context, None); in TEST_F()
706 MDNode *Empty = MDTuple::get(Context, ArrayRef<Metadata *>()); in TEST_F()
707 MDNode *N = MDTuple::get(Context, Ops); in TEST_F()
724 auto *Empty = MDTuple::get(Context, None); in TEST_F()
728 auto Temp = MDTuple::getTemporary(Context, Ops); in TEST_F()
740 auto Temp = MDTuple::getTemporary(Context, Ops); in TEST_F()
750 auto Unresolved = MDTuple::getTemporary(Context, None); in TEST_F()
752 auto Temp = MDTuple::getTemporary(Context, Ops); in TEST_F()
772 MDTuple *Op = MDTuple::getTemporary(Context, None).release(); in TEST_F()
777 MDTuple *N = MDTuple::getTemporary(Context, Ops).release(); in TEST_F()
792 Type *Ty = Type::getInt1PtrTy(Context); in TEST_F()
799 MDTuple *N = MDTuple::getTemporary(Context, Ops).release(); in TEST_F()
810 ASSERT_NE(N, MDTuple::get(Context, NullOps)); in TEST_F()
815 Type *Ty = Type::getInt1PtrTy(Context); in TEST_F()
822 MDTuple *N = MDTuple::getTemporary(Context, Ops).release(); in TEST_F()
834 ASSERT_EQ(N, MDTuple::get(Context, NullOps)); in TEST_F()
839 auto *Empty = MDTuple::get(Context, None); in TEST_F()
841 auto Temp = MDTuple::getTemporary(Context, Ops); in TEST_F()
852 auto Unresolved = MDTuple::getTemporary(Context, None); in TEST_F()
854 auto Temp = MDTuple::getTemporary(Context, Ops); in TEST_F()
871 auto Temp = MDTuple::getTemporary(Context, Ops); in TEST_F()
875 auto *U = MDTuple::get(Context, T); in TEST_F()
891 EXPECT_EQ(U, MDTuple::get(Context, N)); in TEST_F()
896 EXPECT_EQ(U, MDNode::replaceWithPermanent(MDTuple::getTemporary(Context, N))); in TEST_F()
900 auto Temp2 = MDTuple::getTemporary(Context, U); in TEST_F()
911 auto Temp = MDTuple::getTemporary(Context, None); in TEST_F()
923 DILocation *L = DILocation::get(Context, 2, 7, N); in TEST_F()
929 DILocation *L = DILocation::get(Context, UINT32_MAX, U16 - 1, N); in TEST_F()
934 DILocation *L = DILocation::get(Context, UINT32_MAX, U16, N); in TEST_F()
939 DILocation *L = DILocation::get(Context, UINT32_MAX, U16 + 1, N); in TEST_F()
947 DIScope *S = DILexicalBlock::get(Context, N, getFile(), 3, 4); in TEST_F()
951 auto *A = DILocation::get(Context, 2, 7, N); in TEST_F()
952 auto *B = DILocation::get(Context, 2, 7, N); in TEST_F()
961 auto *A = DILocation::get(Context, 2, 7, N); in TEST_F()
962 auto *B = DILocation::get(Context, 2, 7, S); in TEST_F()
971 auto *A = DILocation::get(Context, 1, 6, N); in TEST_F()
972 auto *B = DILocation::get(Context, 2, 7, N); in TEST_F()
981 auto *A = DILocation::get(Context, 1, 6, N); in TEST_F()
982 auto *B = DILocation::get(Context, 2, 7, S); in TEST_F()
992 auto *SP1 = DISubprogram::getDistinct(Context, F, "a", "a", F, 0, nullptr, in TEST_F()
995 auto *SP2 = DISubprogram::getDistinct(Context, F, "b", "b", F, 0, nullptr, in TEST_F()
999 auto *I = DILocation::get(Context, 2, 7, N); in TEST_F()
1000 auto *A = DILocation::get(Context, 1, 6, SP1, I); in TEST_F()
1001 auto *B = DILocation::get(Context, 2, 7, SP2, I); in TEST_F()
1011 auto *I = DILocation::get(Context, 2, 7, N); in TEST_F()
1012 auto *A = DILocation::get(Context, 1, 6, S, I); in TEST_F()
1013 auto *B = DILocation::get(Context, 2, 7, getSubprogram()); in TEST_F()
1025 DILocation *L0 = DILocation::getDistinct(Context, 2, 7, N); in TEST_F()
1027 DILocation *L1 = DILocation::get(Context, 2, 7, N); in TEST_F()
1029 EXPECT_EQ(L1, DILocation::get(Context, 2, 7, N)); in TEST_F()
1033 MDNode *N = MDNode::get(Context, None); in TEST_F()
1034 auto L = DILocation::getTemporary(Context, 2, 7, N); in TEST_F()
1040 MDNode *N = MDNode::get(Context, None); in TEST_F()
1041 auto L = DILocation::getTemporary(Context, 2, 7, N); in TEST_F()
1111 auto L1 = DILocation::get(Context, 1, 2, getSubprogram()); in TEST_F()
1157 auto *Empty = MDNode::get(Context, None); in TEST_F()
1159 auto *N = GenericDINode::get(Context, 15, Header, Ops1); in TEST_F()
1163 EXPECT_EQ(MDString::get(Context, Header), N->getOperand(0)); in TEST_F()
1169 EXPECT_EQ(N, GenericDINode::get(Context, 15, Header, Ops1)); in TEST_F()
1178 EXPECT_EQ(N, GenericDINode::get(Context, 15, Header, Ops2)); in TEST_F()
1185 EXPECT_EQ(N, GenericDINode::get(Context, 15, Header, Ops1)); in TEST_F()
1193 auto *N = GenericDINode::get(Context, 15, StringRef(), None); in TEST_F()
1201 auto *N = DISubrange::get(Context, 5, 7); in TEST_F()
1209 EXPECT_EQ(N, DISubrange::get(Context, 5, 7)); in TEST_F()
1210 EXPECT_EQ(DISubrange::get(Context, 5, 0), DISubrange::get(Context, 5)); in TEST_F()
1217 auto *N = DISubrange::get(Context, -1, 0); in TEST_F()
1225 EXPECT_EQ(N, DISubrange::get(Context, -1, 0)); in TEST_F()
1233 auto *VlaExpr = DILocalVariable::get(Context, Scope, "vla_expr", File, 8, in TEST_F()
1236 auto *N = DISubrange::get(Context, VlaExpr, 0); in TEST_F()
1245 EXPECT_EQ(N, DISubrange::get(Context, VlaExpr, 0)); in TEST_F()
1254 ConstantInt::getSigned(Type::getInt64Ty(Context), -10)); in TEST_F()
1256 ConstantInt::getSigned(Type::getInt64Ty(Context), 10)); in TEST_F()
1258 ConstantInt::getSigned(Type::getInt64Ty(Context), 4)); in TEST_F()
1260 ConstantInt::getSigned(Type::getInt64Ty(Context), 20)); in TEST_F()
1261 auto *UVother = DILocalVariable::get(Context, Scope, "ubother", File, 8, Type, in TEST_F()
1263 auto *UEother = DIExpression::get(Context, {5, 6}); in TEST_F()
1265 ConstantInt::getSigned(Type::getInt64Ty(Context), 0)); in TEST_F()
1267 ConstantInt::getSigned(Type::getInt64Ty(Context), 0)); in TEST_F()
1269 auto *N = DISubrange::get(Context, nullptr, LI, UI, SI); in TEST_F()
1286 EXPECT_EQ(N, DISubrange::get(Context, nullptr, LI, UI, SI)); in TEST_F()
1288 EXPECT_NE(N, DISubrange::get(Context, nullptr, LI, UIother, SI)); in TEST_F()
1289 EXPECT_NE(N, DISubrange::get(Context, nullptr, LI, UEother, SI)); in TEST_F()
1290 EXPECT_NE(N, DISubrange::get(Context, nullptr, LI, UVother, SI)); in TEST_F()
1292 auto *NZeroLower = DISubrange::get(Context, nullptr, LIZero, UI, SI); in TEST_F()
1293 EXPECT_NE(NZeroLower, DISubrange::get(Context, nullptr, nullptr, UI, SI)); in TEST_F()
1295 auto *NZeroUpper = DISubrange::get(Context, nullptr, LI, UIZero, SI); in TEST_F()
1296 EXPECT_NE(NZeroUpper, DISubrange::get(Context, nullptr, LI, nullptr, SI)); in TEST_F()
1305 DILocalVariable::get(Context, Scope, "lb", File, 8, Type, 2, Flags, 8, in TEST_F()
1308 DILocalVariable::get(Context, Scope, "ub", File, 8, Type, 2, Flags, 8, in TEST_F()
1311 DILocalVariable::get(Context, Scope, "st", File, 8, Type, 2, Flags, 8, in TEST_F()
1313 auto *SVother = DILocalVariable::get(Context, Scope, "stother", File, 8, Type, in TEST_F()
1316 ConstantInt::getSigned(Type::getInt64Ty(Context), 20)); in TEST_F()
1317 auto *SEother = DIExpression::get(Context, {5, 6}); in TEST_F()
1319 auto *N = DISubrange::get(Context, nullptr, LV, UV, SV); in TEST_F()
1336 EXPECT_EQ(N, DISubrange::get(Context, nullptr, LV, UV, SV)); in TEST_F()
1338 EXPECT_NE(N, DISubrange::get(Context, nullptr, LV, UV, SVother)); in TEST_F()
1339 EXPECT_NE(N, DISubrange::get(Context, nullptr, LV, UV, SEother)); in TEST_F()
1340 EXPECT_NE(N, DISubrange::get(Context, nullptr, LV, UV, SIother)); in TEST_F()
1348 auto *LE = DIExpression::get(Context, {1, 2}); in TEST_F()
1349 auto *UE = DIExpression::get(Context, {2, 3}); in TEST_F()
1350 auto *SE = DIExpression::get(Context, {3, 4}); in TEST_F()
1351 auto *LEother = DIExpression::get(Context, {5, 6}); in TEST_F()
1353 ConstantInt::getSigned(Type::getInt64Ty(Context), 20)); in TEST_F()
1354 auto *LVother = DILocalVariable::get(Context, Scope, "lbother", File, 8, Type, in TEST_F()
1357 auto *N = DISubrange::get(Context, nullptr, LE, UE, SE); in TEST_F()
1374 EXPECT_EQ(N, DISubrange::get(Context, nullptr, LE, UE, SE)); in TEST_F()
1376 EXPECT_NE(N, DISubrange::get(Context, nullptr, LEother, UE, SE)); in TEST_F()
1377 EXPECT_NE(N, DISubrange::get(Context, nullptr, LIother, UE, SE)); in TEST_F()
1378 EXPECT_NE(N, DISubrange::get(Context, nullptr, LVother, UE, SE)); in TEST_F()
1389 Context, {dwarf::DW_OP_consts, static_cast<uint64_t>(-10)}); in TEST_F()
1390 auto *UI = DIExpression::get(Context, {dwarf::DW_OP_consts, 10}); in TEST_F()
1391 auto *SI = DIExpression::get(Context, {dwarf::DW_OP_consts, 4}); in TEST_F()
1392 auto *UIother = DIExpression::get(Context, {dwarf::DW_OP_consts, 20}); in TEST_F()
1393 auto *UVother = DILocalVariable::get(Context, Scope, "ubother", File, 8, Type, in TEST_F()
1395 auto *UEother = DIExpression::get(Context, {5, 6}); in TEST_F()
1396 auto *LIZero = DIExpression::get(Context, {dwarf::DW_OP_consts, 0}); in TEST_F()
1397 auto *UIZero = DIExpression::get(Context, {dwarf::DW_OP_consts, 0}); in TEST_F()
1399 auto *N = DIGenericSubrange::get(Context, nullptr, LI, UI, SI); in TEST_F()
1416 EXPECT_EQ(N, DIGenericSubrange::get(Context, nullptr, LI, UI, SI)); in TEST_F()
1418 EXPECT_NE(N, DIGenericSubrange::get(Context, nullptr, LI, UIother, SI)); in TEST_F()
1419 EXPECT_NE(N, DIGenericSubrange::get(Context, nullptr, LI, UEother, SI)); in TEST_F()
1420 EXPECT_NE(N, DIGenericSubrange::get(Context, nullptr, LI, UVother, SI)); in TEST_F()
1422 auto *NZeroLower = DIGenericSubrange::get(Context, nullptr, LIZero, UI, SI); in TEST_F()
1424 DIGenericSubrange::get(Context, nullptr, nullptr, UI, SI)); in TEST_F()
1426 auto *NZeroUpper = DIGenericSubrange::get(Context, nullptr, LI, UIZero, SI); in TEST_F()
1428 DIGenericSubrange::get(Context, nullptr, LI, nullptr, SI)); in TEST_F()
1437 DILocalVariable::get(Context, Scope, "lb", File, 8, Type, 2, Flags, 8, in TEST_F()
1440 DILocalVariable::get(Context, Scope, "ub", File, 8, Type, 2, Flags, 8, in TEST_F()
1443 DILocalVariable::get(Context, Scope, "st", File, 8, Type, 2, Flags, 8, in TEST_F()
1445 auto *SVother = DILocalVariable::get(Context, Scope, "stother", File, 8, Type, in TEST_F()
1448 Context, {dwarf::DW_OP_consts, static_cast<uint64_t>(-1)}); in TEST_F()
1449 auto *SEother = DIExpression::get(Context, {5, 6}); in TEST_F()
1451 auto *N = DIGenericSubrange::get(Context, nullptr, LV, UV, SV); in TEST_F()
1468 EXPECT_EQ(N, DIGenericSubrange::get(Context, nullptr, LV, UV, SV)); in TEST_F()
1470 EXPECT_NE(N, DIGenericSubrange::get(Context, nullptr, LV, UV, SVother)); in TEST_F()
1471 EXPECT_NE(N, DIGenericSubrange::get(Context, nullptr, LV, UV, SEother)); in TEST_F()
1472 EXPECT_NE(N, DIGenericSubrange::get(Context, nullptr, LV, UV, SIother)); in TEST_F()
1481 DILocalVariable::get(Context, Scope, "lb", File, 8, Type, 2, Flags, 8, nullptr); in TEST_F()
1482 auto *UE = DIExpression::get(Context, {2, 3}); in TEST_F()
1483 auto *SE = DIExpression::get(Context, {3, 4}); in TEST_F()
1485 auto *LVother = DILocalVariable::get(Context, Scope, "lbother", File, 8, Type, in TEST_F()
1488 Context, {dwarf::DW_OP_consts, static_cast<uint64_t>(-1)}); in TEST_F()
1490 Module M("M", Context); in TEST_F()
1532 auto *N = DIEnumerator::get(Context, 7, false, "name"); in TEST_F()
1537 EXPECT_EQ(N, DIEnumerator::get(Context, 7, false, "name")); in TEST_F()
1539 EXPECT_NE(N, DIEnumerator::get(Context, 7, true, "name")); in TEST_F()
1540 EXPECT_NE(N, DIEnumerator::get(Context, 8, false, "name")); in TEST_F()
1541 EXPECT_NE(N, DIEnumerator::get(Context, 7, false, "nam")); in TEST_F()
1548 auto *N = DIEnumerator::get(Context, APInt::getMaxValue(128), false, "val"); in TEST_F()
1551 DIEnumerator::get(Context, APInt::getMaxValue(128), false, "val")); in TEST_F()
1553 DIEnumerator::get(Context, APInt::getMinValue(128), false, "val")); in TEST_F()
1560 DIBasicType::get(Context, dwarf::DW_TAG_base_type, "special", 33, 26, 7, in TEST_F()
1569 EXPECT_EQ(N, DIBasicType::get(Context, dwarf::DW_TAG_base_type, "special", 33, in TEST_F()
1572 EXPECT_NE(N, DIBasicType::get(Context, dwarf::DW_TAG_unspecified_type, in TEST_F()
1575 DIBasicType::get(Context, dwarf::DW_TAG_base_type, "s", 33, 26, 7, in TEST_F()
1577 EXPECT_NE(N, DIBasicType::get(Context, dwarf::DW_TAG_base_type, "special", 32, in TEST_F()
1579 EXPECT_NE(N, DIBasicType::get(Context, dwarf::DW_TAG_base_type, "special", 33, in TEST_F()
1581 EXPECT_NE(N, DIBasicType::get(Context, dwarf::DW_TAG_base_type, "special", 33, in TEST_F()
1583 EXPECT_NE(N, DIBasicType::get(Context, dwarf::DW_TAG_base_type, "special", 33, in TEST_F()
1585 EXPECT_NE(N, DIBasicType::get(Context, dwarf::DW_TAG_base_type, "special", 33, in TEST_F()
1593 auto *N = DIBasicType::get(Context, dwarf::DW_TAG_base_type, "special", in TEST_F()
1601 DIBasicType::get(Context, dwarf::DW_TAG_unspecified_type, "unspecified"); in TEST_F()
1615 DIType *N = DIBasicType::get(Context, dwarf::DW_TAG_base_type, "int", 32, 32, in TEST_F()
1625 Metadata *Types = MDTuple::get(Context, TypesOps); in TEST_F()
1628 DISubroutineType::getDistinct(Context, DINode::FlagZero, 0, Types); in TEST_F()
1635 DISubroutineType::getTemporary(Context, DINode::FlagZero, 0, Types); in TEST_F()
1654 DIDerivedType::get(Context, dwarf::DW_TAG_pointer_type, "something", File, in TEST_F()
1669 EXPECT_EQ(N, DIDerivedType::get(Context, dwarf::DW_TAG_pointer_type, in TEST_F()
1673 EXPECT_NE(N, DIDerivedType::get(Context, dwarf::DW_TAG_reference_type, in TEST_F()
1676 EXPECT_NE(N, DIDerivedType::get(Context, dwarf::DW_TAG_pointer_type, "else", in TEST_F()
1679 EXPECT_NE(N, DIDerivedType::get(Context, dwarf::DW_TAG_pointer_type, in TEST_F()
1682 EXPECT_NE(N, DIDerivedType::get(Context, dwarf::DW_TAG_pointer_type, in TEST_F()
1685 EXPECT_NE(N, DIDerivedType::get(Context, dwarf::DW_TAG_pointer_type, in TEST_F()
1690 Context, dwarf::DW_TAG_pointer_type, "something", File, 1, in TEST_F()
1693 EXPECT_NE(N, DIDerivedType::get(Context, dwarf::DW_TAG_pointer_type, in TEST_F()
1696 EXPECT_NE(N, DIDerivedType::get(Context, dwarf::DW_TAG_pointer_type, in TEST_F()
1699 EXPECT_NE(N, DIDerivedType::get(Context, dwarf::DW_TAG_pointer_type, in TEST_F()
1702 EXPECT_NE(N, DIDerivedType::get(Context, dwarf::DW_TAG_pointer_type, in TEST_F()
1705 EXPECT_NE(N, DIDerivedType::get(Context, dwarf::DW_TAG_pointer_type, in TEST_F()
1708 EXPECT_NE(N, DIDerivedType::get(Context, dwarf::DW_TAG_pointer_type, in TEST_F()
1724 Context, dwarf::DW_TAG_pointer_type, "something", File, 1, Scope, in TEST_F()
1752 auto *N = DICompositeType::get(Context, Tag, Name, File, Line, Scope, in TEST_F()
1772 EXPECT_EQ(N, DICompositeType::get(Context, Tag, Name, File, Line, Scope, in TEST_F()
1777 EXPECT_NE(N, DICompositeType::get(Context, Tag + 1, Name, File, Line, Scope, in TEST_F()
1781 EXPECT_NE(N, DICompositeType::get(Context, Tag, "abc", File, Line, Scope, in TEST_F()
1785 EXPECT_NE(N, DICompositeType::get(Context, Tag, Name, getFile(), Line, Scope, in TEST_F()
1789 EXPECT_NE(N, DICompositeType::get(Context, Tag, Name, File, Line + 1, Scope, in TEST_F()
1794 Context, Tag, Name, File, Line, getSubprogram(), BaseType, in TEST_F()
1798 Context, Tag, Name, File, Line, Scope, getBasicType("other"), in TEST_F()
1801 EXPECT_NE(N, DICompositeType::get(Context, Tag, Name, File, Line, Scope, in TEST_F()
1805 EXPECT_NE(N, DICompositeType::get(Context, Tag, Name, File, Line, Scope, in TEST_F()
1810 Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits, in TEST_F()
1815 Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits, in TEST_F()
1819 Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits, in TEST_F()
1823 Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits, in TEST_F()
1827 Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits, in TEST_F()
1830 EXPECT_NE(N, DICompositeType::get(Context, Tag, Name, File, Line, Scope, in TEST_F()
1834 EXPECT_NE(N, DICompositeType::get(Context, Tag, Name, File, Line, Scope, in TEST_F()
1840 EXPECT_FALSE(DICompositeType::get(Context, Tag, Name, File, Line, Scope, in TEST_F()
1845 EXPECT_FALSE(DICompositeType::get(Context, Tag, Name, File, Line, Scope, in TEST_F()
1872 auto *N = DICompositeType::get(Context, Tag, Name, File, Line, Scope, in TEST_F()
1896 Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits, AlignInBits, in TEST_F()
1899 auto *Elements = MDTuple::getDistinct(Context, None); in TEST_F()
1918 auto *TemplateParams = MDTuple::getDistinct(Context, None); in TEST_F()
1945 Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits, AlignInBits, in TEST_F()
1951 Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits, AlignInBits, in TEST_F()
1955 Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits, AlignInBits, in TEST_F()
1959 Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits, AlignInBits, in TEST_F()
1985 Metadata *DlVar1 = DILocalVariable::get(Context, Scope, "dl_var1", File, 8, in TEST_F()
1987 Metadata *DlVar2 = DILocalVariable::get(Context, Scope, "dl_var2", File, 8, in TEST_F()
1990 Metadata *DataLocation1 = DIExpression::get(Context, Elements1); in TEST_F()
1993 Metadata *DataLocation2 = DIExpression::get(Context, Elements2); in TEST_F()
1996 Metadata *Rank1 = DIExpression::get(Context, Elements3); in TEST_F()
1999 Metadata *Rank2 = DIExpression::get(Context, Elements4); in TEST_F()
2001 ConstantInt *RankInt1 = ConstantInt::get(Context, APInt(7, 0)); in TEST_F()
2003 ConstantInt *RankInt2 = ConstantInt::get(Context, APInt(6, 0)); in TEST_F()
2006 Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits, AlignInBits, in TEST_F()
2011 Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits, AlignInBits, in TEST_F()
2016 Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits, AlignInBits, in TEST_F()
2025 Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits, AlignInBits, in TEST_F()
2030 Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits, AlignInBits, in TEST_F()
2035 Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits, AlignInBits, in TEST_F()
2044 Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits, AlignInBits, in TEST_F()
2049 Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits, AlignInBits, in TEST_F()
2054 Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits, AlignInBits, in TEST_F()
2063 Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits, AlignInBits, in TEST_F()
2068 Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits, AlignInBits, in TEST_F()
2073 Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits, AlignInBits, in TEST_F()
2089 auto *N = DISubroutineType::get(Context, Flags, 0, TypeArray); in TEST_F()
2093 EXPECT_EQ(N, DISubroutineType::get(Context, Flags, 0, TypeArray)); in TEST_F()
2095 EXPECT_NE(N, DISubroutineType::get(Context, FlagsPOne, 0, TypeArray)); in TEST_F()
2096 EXPECT_NE(N, DISubroutineType::get(Context, Flags, 0, getTuple())); in TEST_F()
2100 Context, Flags, dwarf::DW_CC_BORLAND_msfastcall, TypeArray); in TEST_F()
2101 auto *Std = DISubroutineType::get(Context, Flags, in TEST_F()
2104 DISubroutineType::get(Context, Flags, in TEST_F()
2107 Context, Flags, dwarf::DW_CC_BORLAND_stdcall, TypeArray)); in TEST_F()
2131 auto *N = DIFile::get(Context, Filename, Directory, Checksum, Source); in TEST_F()
2138 EXPECT_EQ(N, DIFile::get(Context, Filename, Directory, Checksum, Source)); in TEST_F()
2140 EXPECT_NE(N, DIFile::get(Context, "other", Directory, Checksum, Source)); in TEST_F()
2141 EXPECT_NE(N, DIFile::get(Context, Filename, "other", Checksum, Source)); in TEST_F()
2144 N, DIFile::get(Context, Filename, Directory, OtherChecksum)); in TEST_F()
2146 EXPECT_NE(N, DIFile::get(Context, Filename, Directory, Checksum, OtherSource)); in TEST_F()
2147 EXPECT_NE(N, DIFile::get(Context, Filename, Directory, Checksum)); in TEST_F()
2148 EXPECT_NE(N, DIFile::get(Context, Filename, Directory)); in TEST_F()
2156 DIScope *N = DIFile::get(Context, "file", "dir"); in TEST_F()
2180 Context, SourceLanguage, File, Producer, IsOptimized, Flags, in TEST_F()
2236 MDTuple *EnumTypes = MDTuple::getDistinct(Context, None); in TEST_F()
2237 MDTuple *RetainedTypes = MDTuple::getDistinct(Context, None); in TEST_F()
2238 MDTuple *ImportedEntities = MDTuple::getDistinct(Context, None); in TEST_F()
2243 Context, SourceLanguage, File, Producer, IsOptimized, Flags, in TEST_F()
2248 auto *GlobalVariables = MDTuple::getDistinct(Context, None); in TEST_F()
2255 auto *Macros = MDTuple::getDistinct(Context, None); in TEST_F()
2295 Context, Scope, Name, LinkageName, File, Line, Type, ScopeLine, in TEST_F()
2323 EXPECT_EQ(N, DISubprogram::get(Context, Scope, Name, LinkageName, File, Line, in TEST_F()
2329 EXPECT_NE(N, DISubprogram::get(Context, getCompositeType(), Name, LinkageName, in TEST_F()
2335 EXPECT_NE(N, DISubprogram::get(Context, Scope, "other", LinkageName, File, in TEST_F()
2341 EXPECT_NE(N, DISubprogram::get(Context, Scope, Name, "other", File, Line, in TEST_F()
2346 EXPECT_NE(N, DISubprogram::get(Context, Scope, Name, LinkageName, getFile(), in TEST_F()
2352 EXPECT_NE(N, DISubprogram::get(Context, Scope, Name, LinkageName, File, in TEST_F()
2358 EXPECT_NE(N, DISubprogram::get(Context, Scope, Name, LinkageName, File, Line, in TEST_F()
2365 Context, Scope, Name, LinkageName, File, Line, Type, in TEST_F()
2371 Context, Scope, Name, LinkageName, File, Line, Type, in TEST_F()
2376 EXPECT_NE(N, DISubprogram::get(Context, Scope, Name, LinkageName, File, Line, in TEST_F()
2382 EXPECT_NE(N, DISubprogram::get(Context, Scope, Name, LinkageName, File, Line, in TEST_F()
2389 Context, Scope, Name, LinkageName, File, Line, Type, in TEST_F()
2394 EXPECT_NE(N, DISubprogram::get(Context, Scope, Name, LinkageName, File, Line, in TEST_F()
2401 Context, Scope, Name, LinkageName, File, Line, Type, in TEST_F()
2406 EXPECT_NE(N, DISubprogram::get(Context, Scope, Name, LinkageName, File, Line, in TEST_F()
2412 DISubprogram::get(Context, Scope, Name, LinkageName, File, Line, in TEST_F()
2417 EXPECT_NE(N, DISubprogram::get(Context, Scope, Name, LinkageName, File, Line, in TEST_F()
2422 EXPECT_NE(N, DISubprogram::get(Context, Scope, Name, LinkageName, File, Line, in TEST_F()
2427 EXPECT_NE(N, DISubprogram::get(Context, Scope, Name, LinkageName, File, Line, in TEST_F()
2432 EXPECT_NE(N, DISubprogram::get(Context, Scope, Name, LinkageName, File, Line, in TEST_F()
2437 EXPECT_NE(N, DISubprogram::get(Context, Scope, Name, LinkageName, File, Line, in TEST_F()
2455 auto *N = DILexicalBlock::get(Context, Scope, File, Line, Column); in TEST_F()
2462 EXPECT_EQ(N, DILexicalBlock::get(Context, Scope, File, Line, Column)); in TEST_F()
2465 DILexicalBlock::get(Context, getSubprogram(), File, Line, Column)); in TEST_F()
2466 EXPECT_NE(N, DILexicalBlock::get(Context, Scope, getFile(), Line, Column)); in TEST_F()
2467 EXPECT_NE(N, DILexicalBlock::get(Context, Scope, File, Line + 1, Column)); in TEST_F()
2468 EXPECT_NE(N, DILexicalBlock::get(Context, Scope, File, Line, Column + 1)); in TEST_F()
2478 auto *LB = DILexicalBlock::get(Context, SP, F, 2, 7); in TEST_F()
2484 auto *LB = DILexicalBlock::get(Context, SP, F, UINT32_MAX, U16 - 1); in TEST_F()
2489 auto *LB = DILexicalBlock::get(Context, SP, F, UINT32_MAX, U16); in TEST_F()
2494 auto *LB = DILexicalBlock::get(Context, SP, F, UINT32_MAX, U16 + 1); in TEST_F()
2507 auto *N = DILexicalBlockFile::get(Context, Scope, File, Discriminator); in TEST_F()
2513 EXPECT_EQ(N, DILexicalBlockFile::get(Context, Scope, File, Discriminator)); in TEST_F()
2515 EXPECT_NE(N, DILexicalBlockFile::get(Context, getSubprogram(), File, in TEST_F()
2518 DILexicalBlockFile::get(Context, Scope, getFile(), Discriminator)); in TEST_F()
2520 DILexicalBlockFile::get(Context, Scope, File, Discriminator + 1)); in TEST_F()
2533 auto *N = DINamespace::get(Context, Scope, Name, ExportSymbols); in TEST_F()
2538 EXPECT_EQ(N, DINamespace::get(Context, Scope, Name, ExportSymbols)); in TEST_F()
2539 EXPECT_NE(N, DINamespace::get(Context, getFile(), Name, ExportSymbols)); in TEST_F()
2540 EXPECT_NE(N, DINamespace::get(Context, Scope, "other", ExportSymbols)); in TEST_F()
2541 EXPECT_NE(N, DINamespace::get(Context, Scope, Name, !ExportSymbols)); in TEST_F()
2559 auto *N = DIModule::get(Context, File, Scope, Name, ConfigMacro, Includes, in TEST_F()
2571 EXPECT_EQ(N, DIModule::get(Context, File, Scope, Name, ConfigMacro, Includes, in TEST_F()
2573 EXPECT_NE(N, DIModule::get(Context, getFile(), getFile(), Name, ConfigMacro, in TEST_F()
2575 EXPECT_NE(N, DIModule::get(Context, File, Scope, "other", ConfigMacro, in TEST_F()
2577 EXPECT_NE(N, DIModule::get(Context, File, Scope, Name, "other", Includes, in TEST_F()
2579 EXPECT_NE(N, DIModule::get(Context, File, Scope, Name, ConfigMacro, "other", in TEST_F()
2581 EXPECT_NE(N, DIModule::get(Context, File, Scope, Name, ConfigMacro, Includes, in TEST_F()
2583 EXPECT_NE(N, DIModule::get(Context, getFile(), Scope, Name, ConfigMacro, in TEST_F()
2585 EXPECT_NE(N, DIModule::get(Context, File, Scope, Name, ConfigMacro, Includes, in TEST_F()
2587 EXPECT_NE(N, DIModule::get(Context, File, Scope, Name, ConfigMacro, Includes, in TEST_F()
2601 auto *N = DITemplateTypeParameter::get(Context, Name, Type, defaulted); in TEST_F()
2606 EXPECT_EQ(N, DITemplateTypeParameter::get(Context, Name, Type, defaulted)); in TEST_F()
2608 EXPECT_NE(N, DITemplateTypeParameter::get(Context, "other", Type, defaulted)); in TEST_F()
2609 EXPECT_NE(N, DITemplateTypeParameter::get(Context, Name, in TEST_F()
2611 EXPECT_NE(N, DITemplateTypeParameter::get(Context, Name, Type, true)); in TEST_F()
2627 DITemplateValueParameter::get(Context, Tag, Name, Type, defaulted, Value); in TEST_F()
2632 EXPECT_EQ(N, DITemplateValueParameter::get(Context, Tag, Name, Type, in TEST_F()
2636 Context, dwarf::DW_TAG_GNU_template_template_param, Name, in TEST_F()
2638 EXPECT_NE(N, DITemplateValueParameter::get(Context, Tag, "other", Type, in TEST_F()
2640 EXPECT_NE(N, DITemplateValueParameter::get(Context, Tag, Name, in TEST_F()
2644 DITemplateValueParameter::get(Context, Tag, Name, Type, defaulted, in TEST_F()
2647 N, DITemplateValueParameter::get(Context, Tag, Name, Type, true, Value)); in TEST_F()
2671 Context, Scope, Name, LinkageName, File, Line, Type, IsLocalToUnit, in TEST_F()
2687 EXPECT_EQ(N, DIGlobalVariable::get(Context, Scope, Name, LinkageName, File, in TEST_F()
2693 Context, getSubprogram(), Name, LinkageName, File, Line, in TEST_F()
2697 EXPECT_NE(N, DIGlobalVariable::get(Context, Scope, "other", LinkageName, File, in TEST_F()
2701 EXPECT_NE(N, DIGlobalVariable::get(Context, Scope, Name, "other", File, Line, in TEST_F()
2705 EXPECT_NE(N, DIGlobalVariable::get(Context, Scope, Name, LinkageName, in TEST_F()
2709 EXPECT_NE(N, DIGlobalVariable::get(Context, Scope, Name, LinkageName, File, in TEST_F()
2713 EXPECT_NE(N, DIGlobalVariable::get(Context, Scope, Name, LinkageName, File, in TEST_F()
2717 EXPECT_NE(N, DIGlobalVariable::get(Context, Scope, Name, LinkageName, File, in TEST_F()
2721 EXPECT_NE(N, DIGlobalVariable::get(Context, Scope, Name, LinkageName, File, in TEST_F()
2725 EXPECT_NE(N, DIGlobalVariable::get(Context, Scope, Name, LinkageName, File, in TEST_F()
2729 EXPECT_NE(N, DIGlobalVariable::get(Context, Scope, Name, LinkageName, File, in TEST_F()
2733 EXPECT_NE(N, DIGlobalVariable::get(Context, Scope, Name, LinkageName, File, in TEST_F()
2755 auto *Expr = DIExpression::get(Context, {1, 2}); in TEST_F()
2756 auto *Expr2 = DIExpression::get(Context, {1, 2, 3}); in TEST_F()
2762 Context, Scope, Name, LinkageName, File, Line, Type, IsLocalToUnit, in TEST_F()
2766 Context, Scope, "other", LinkageName, File, Line, Type, IsLocalToUnit, in TEST_F()
2769 auto *N = DIGlobalVariableExpression::get(Context, Var, Expr); in TEST_F()
2773 EXPECT_EQ(N, DIGlobalVariableExpression::get(Context, Var, Expr)); in TEST_F()
2774 EXPECT_NE(N, DIGlobalVariableExpression::get(Context, Var2, Expr)); in TEST_F()
2775 EXPECT_NE(N, DIGlobalVariableExpression::get(Context, Var, Expr2)); in TEST_F()
2794 DILocalVariable::get(Context, Scope, Name, File, Line, Type, Arg, Flags, in TEST_F()
2805 EXPECT_EQ(N, DILocalVariable::get(Context, Scope, Name, File, Line, Type, Arg, in TEST_F()
2809 DILocalVariable::get(Context, Scope, Name, File, Line, Type, 0, Flags, in TEST_F()
2811 EXPECT_NE(N, DILocalVariable::get(Context, getSubprogram(), Name, File, Line, in TEST_F()
2813 EXPECT_NE(N, DILocalVariable::get(Context, Scope, "other", File, Line, Type, in TEST_F()
2815 EXPECT_NE(N, DILocalVariable::get(Context, Scope, Name, getFile(), Line, Type, in TEST_F()
2817 EXPECT_NE(N, DILocalVariable::get(Context, Scope, Name, File, Line + 1, Type, in TEST_F()
2819 EXPECT_NE(N, DILocalVariable::get(Context, Scope, Name, File, Line, in TEST_F()
2822 EXPECT_NE(N, DILocalVariable::get(Context, Scope, Name, File, Line, Type, in TEST_F()
2824 EXPECT_NE(N, DILocalVariable::get(Context, Scope, Name, File, Line, Type, in TEST_F()
2832 EXPECT_EQ(255u, DILocalVariable::get(Context, getSubprogram(), "", getFile(), in TEST_F()
2836 EXPECT_EQ(256u, DILocalVariable::get(Context, getSubprogram(), "", getFile(), in TEST_F()
2840 EXPECT_EQ(257u, DILocalVariable::get(Context, getSubprogram(), "", getFile(), in TEST_F()
2845 EXPECT_EQ(Max, DILocalVariable::get(Context, getSubprogram(), "", getFile(), in TEST_F()
2855 auto *N = DIExpression::get(Context, Elements); in TEST_F()
2857 EXPECT_EQ(N, DIExpression::get(Context, Elements)); in TEST_F()
2871 auto *N0 = DIExpression::get(Context, Elts0); in TEST_F()
2882 auto *N1 = DIExpression::get(Context, Elts1); in TEST_F()
2896 EXPECT_TRUE(DIExpression::get(Context, Elements)->isValid()); \ in TEST_F()
2901 EXPECT_FALSE(DIExpression::get(Context, Elements)->isValid()); \ in TEST_F()
2905 EXPECT_TRUE(DIExpression::get(Context, None)); in TEST_F()
2935 DIExpression *Expression = DIExpression::get(Context, Elements); \ in TEST_F()
2943 DIExpression *Expression = DIExpression::get(Context, Elements); \ in TEST_F()
2951 DIExpression::get(Context, {}), 0, 32); in TEST_F()
2986 Context, {dwarf::DW_OP_LLVM_arg, 0, dwarf::DW_OP_LLVM_arg, 1, in TEST_F()
3011 Int = ConstantInt::get(Context, APInt(StartWidth, StartValue)); \ in TEST_F()
3018 Expr = DIExpression::get(Context, {dwarf::DW_OP_deref}); in TEST_F()
3026 Context, {dwarf::DW_OP_LLVM_convert, 72, dwarf::DW_ATE_unsigned}); in TEST_F()
3031 Context, {dwarf::DW_OP_LLVM_convert, 8, dwarf::DW_ATE_unsigned, in TEST_F()
3037 Context, {dwarf::DW_OP_LLVM_convert, 32, dwarf::DW_ATE_signed}); in TEST_F()
3044 Context, {dwarf::DW_OP_LLVM_convert, 32, dwarf::DW_ATE_signed}); in TEST_F()
3064 auto *N = DIObjCProperty::get(Context, Name, File, Line, GetterName, in TEST_F()
3075 EXPECT_EQ(N, DIObjCProperty::get(Context, Name, File, Line, GetterName, in TEST_F()
3078 EXPECT_NE(N, DIObjCProperty::get(Context, "other", File, Line, GetterName, in TEST_F()
3080 EXPECT_NE(N, DIObjCProperty::get(Context, Name, getFile(), Line, GetterName, in TEST_F()
3082 EXPECT_NE(N, DIObjCProperty::get(Context, Name, File, Line + 1, GetterName, in TEST_F()
3084 EXPECT_NE(N, DIObjCProperty::get(Context, Name, File, Line, "other", in TEST_F()
3086 EXPECT_NE(N, DIObjCProperty::get(Context, Name, File, Line, GetterName, in TEST_F()
3088 EXPECT_NE(N, DIObjCProperty::get(Context, Name, File, Line, GetterName, in TEST_F()
3090 EXPECT_NE(N, DIObjCProperty::get(Context, Name, File, Line, GetterName, in TEST_F()
3109 DIImportedEntity::get(Context, Tag, Scope, Entity, File, Line, Name); in TEST_F()
3118 N, DIImportedEntity::get(Context, Tag, Scope, Entity, File, Line, Name)); in TEST_F()
3121 DIImportedEntity::get(Context, dwarf::DW_TAG_imported_declaration, in TEST_F()
3123 EXPECT_NE(N, DIImportedEntity::get(Context, Tag, getSubprogram(), Entity, in TEST_F()
3125 EXPECT_NE(N, DIImportedEntity::get(Context, Tag, Scope, getCompositeType(), in TEST_F()
3127 EXPECT_NE(N, DIImportedEntity::get(Context, Tag, Scope, Entity, nullptr, Line, in TEST_F()
3129 EXPECT_NE(N, DIImportedEntity::get(Context, Tag, Scope, Entity, File, in TEST_F()
3131 EXPECT_NE(N, DIImportedEntity::get(Context, Tag, Scope, Entity, File, Line, in TEST_F()
3139 auto *Ne = DIImportedEntity::get(Context, Tag, Scope, Entity, File, Line, in TEST_F()
3144 EXPECT_EQ(Ne, DIImportedEntity::get(Context, Tag, Scope, Entity, File, Line, in TEST_F()
3146 EXPECT_NE(Ne, DIImportedEntity::get(Context, Tag, Scope, Entity, File, Line, in TEST_F()
3148 EXPECT_NE(Ne, DIImportedEntity::get(Context, Tag, Scope, Entity, File, Line, in TEST_F()
3151 Ne, DIImportedEntity::get(Context, Tag, Scope, Entity, File, Line, Name)); in TEST_F()
3160 MDNode *N = MDNode::get(Context, None); in TEST_F()
3161 auto *V = MetadataAsValue::get(Context, N); in TEST_F()
3165 auto *V2 = MetadataAsValue::get(Context, N); in TEST_F()
3170 MDNode *N = MDNode::get(Context, None); in TEST_F()
3172 MDNode *N2 = MDNode::get(Context, Ops); in TEST_F()
3173 auto *V = MetadataAsValue::get(Context, N2); in TEST_F()
3177 auto *V2 = MetadataAsValue::get(Context, N2); in TEST_F()
3180 auto *V3 = MetadataAsValue::get(Context, N); in TEST_F()
3187 auto *C = ConstantInt::getTrue(Context); in TEST_F()
3190 auto *N = MDNode::get(Context, Ops); in TEST_F()
3192 auto *V = MetadataAsValue::get(Context, MD); in TEST_F()
3196 auto *V2 = MetadataAsValue::get(Context, N); in TEST_F()
3204 Type *Ty = Type::getInt1PtrTy(Context); in TEST_F()
3220 ConstantAsMetadata::get(ConstantInt::get(Context, APInt(8, 0))); in TEST_F()
3222 auto Temp1 = MDTuple::getTemporary(Context, None); in TEST_F()
3223 auto Temp2 = MDTuple::getTemporary(Context, {CI}); in TEST_F()
3224 auto *N = MDTuple::get(Context, {Temp1.get()}); in TEST_F()
3237 ConstantAsMetadata::get(ConstantInt::get(Context, APInt(8, 0))); in TEST_F()
3240 auto Temp = MDTuple::getTemporary(Context, None); in TEST_F()
3246 auto *N1 = MDTuple::get(Context, Ops1); in TEST_F()
3247 auto *N2 = MDTuple::get(Context, Ops2); in TEST_F()
3267 ConstantAsMetadata::get(ConstantInt::get(Context, APInt(8, 0)))); in TEST_F()
3269 ConstantAsMetadata::get(ConstantInt::get(Context, APInt(2, 0)))); in TEST_F()
3270 DIArgList *DV0 = DIArgList::get(Context, VMs); in TEST_F()
3271 DIArgList *DV1 = DIArgList::get(Context, VMs); in TEST_F()
3276 Type *Ty = Type::getInt1PtrTy(Context); in TEST_F()
3278 ConstantAsMetadata::get(ConstantInt::get(Context, APInt(8, 0))); in TEST_F()
3286 auto *AL = DIArgList::get(Context, VMs); in TEST_F()
3301 Type *Ty = Type::getInt1PtrTy(Context); in TEST_F()
3318 Type *Ty = Type::getInt1PtrTy(Context); in TEST_F()
3330 LLVMContext Context; in TEST() local
3332 ConstantAsMetadata::get(ConstantInt::get(Type::getInt32Ty(Context), 1)); in TEST()
3334 ConstantAsMetadata::get(ConstantInt::get(Type::getInt32Ty(Context), 2)); in TEST()
3338 MDNode *n = MDNode::get(Context, V); in TEST()
3339 MDNode *n2 = MDNode::get(Context, V2); in TEST()
3341 Module M("MyModule", Context); in TEST()
3427 EXPECT_EQ(Context.getMDKindID("other1"), MDs[2].first); in TEST_F()
3428 EXPECT_EQ(Context.getMDKindID("other2"), MDs[3].first); in TEST_F()
3452 (void)new UnreachableInst(Context, BasicBlock::Create(Context, "bb", F)); in TEST_F()
3500 auto *D = MDTuple::getDistinct(Context, Ops); in TEST_F()
3506 auto *N0 = MDTuple::get(Context, None); in TEST_F()
3507 auto *N1 = MDTuple::get(Context, N0); in TEST_F()
3518 DistinctMDOperandPlaceholder(7).replaceUseWith(MDTuple::get(Context, None)); in TEST_F()
3530 EXPECT_DEATH(MetadataAsValue::get(Context, &PH), in TEST_F()
3537 EXPECT_DEATH(MDTuple::get(Context, &PH), "Unexpected callback to owner"); in TEST_F()
3543 MDTuple::getDistinct(Context, &PH); in TEST_F()
3544 EXPECT_DEATH(MDTuple::getDistinct(Context, &PH), in TEST_F()
3557 MDTuple::getDistinct(Context, &PH); in TEST_F()
3563 EXPECT_DEATH(MDTuple::getDistinct(Context, &PH), in TEST_F()
3578 DILocation *InlinedLoc = DILocation::get(Context, 2, 7, Scope); in TEST_F()
3581 DILocalVariable::get(Context, Scope, "A", File, 5, Type, 2, Flags, 8, nullptr); in TEST_F()
3583 DILocalVariable::get(Context, Scope, "B", File, 7, Type, 3, Flags, 8, nullptr); in TEST_F()
3611 MDTuple *A = MDTuple::getDistinct(Context, {Value1, Value1}); in TEST_F()
3671 MDTuple *B = MDTuple::getDistinct(Context, Ops); in TEST_F()
3684 auto Temp1 = MDTuple::getTemporary(Context, None); in TEST_F()
3703 MDTuple *C = MDTuple::getDistinct(Context, OpsLarge); in TEST_F()
3741 MDTuple *A = MDTuple::get(Context, None); in TEST_F()
3749 auto B = MDTuple::getTemporary(Context, {Value2}); in TEST_F()