Lines Matching full:context

31   LLVMContext Context;
32 ContextAndReplaceableUses CRU(Context);
33 EXPECT_EQ(&Context, &CRU.getContext());
39 LLVMContext Context;
40 ContextAndReplaceableUses CRU(std::make_unique<ReplaceableMetadataImpl>(Context));
41 EXPECT_EQ(&Context, &CRU.getContext());
47 LLVMContext Context;
48 ContextAndReplaceableUses CRU(Context);
49 CRU.makeReplaceable(std::make_unique<ReplaceableMetadataImpl>(Context));
50 EXPECT_EQ(&Context, &CRU.getContext());
56 LLVMContext Context;
57 auto ReplaceableUses = std::make_unique<ReplaceableMetadataImpl>(Context);
61 EXPECT_EQ(&Context, &CRU.getContext());
69 MetadataTest() : M("test", Context), Counter(0) {}
72 LLVMContext Context;
76 MDNode *getNode() { return MDNode::get(Context, {}); }
77 MDNode *getNode(Metadata *MD) { return MDNode::get(Context, MD); }
80 return MDNode::get(Context, MDs);
83 MDTuple *getTuple() { return MDTuple::getDistinct(Context, {}); }
85 return DISubroutineType::getDistinct(Context, DINode::FlagZero, 0,
90 Context, nullptr, "", "", nullptr, 0, nullptr, 0, nullptr, 0, 0,
94 return DIFile::getDistinct(Context, "file.c", "/path/to/dir");
98 Context, 1, getFile(), "clang", false, "-g", 2, "",
104 return DIBasicType::get(Context, dwarf::DW_TAG_unspecified_type, Name);
108 Context, dwarf::DW_TAG_pointer_type, "", nullptr, 0, nullptr,
112 return ConstantInt::get(Type::getInt32Ty(Context), Counter++);
119 Context, dwarf::DW_TAG_structure_type, "", nullptr, 0, nullptr, nullptr,
124 FunctionType::get(Type::getVoidTy(Context), {}, false),
134 MDString *s1 = MDString::get(Context, StringRef(&x[0], 3));
136 MDString *s2 = MDString::get(Context, StringRef(&x[0], 3));
146 MDString *s1 = MDString::get(Context, StringRef(&x[0], 3));
147 MDString *s2 = MDString::get(Context, StringRef(&y[0], 3));
154 MDString *s = MDString::get(Context, StringRef(&str[0], 13));
166 MDString *s = MDString::get(Context, StringRef(str+0, 5));
180 MDString *s1 = MDString::get(Context, StringRef(&x[0], 3));
181 MDString *s2 = MDString::get(Context, StringRef(&y[0], 3));
183 ConstantAsMetadata::get(ConstantInt::get(Context, APInt(8, 0)));
190 MDNode *n1 = MDNode::get(Context, V);
192 MDNode *n2 = MDNode::get(Context, c1);
194 MDNode *n3 = MDNode::get(Context, V);
195 MDNode *n4 = MDNode::getIfExists(Context, V);
196 MDNode *n5 = MDNode::getIfExists(Context, c1);
197 MDNode *n6 = MDNode::getIfExists(Context, c2);
214 Constant *C = ConstantInt::get(Type::getInt32Ty(Context), 1);
215 Instruction *I = new BitCastInst(C, Type::getInt32Ty(Context));
218 MDNode *n = MDNode::get(Context, V);
230 auto Temp = MDNode::getTemporary(Context, {});
232 MDNode *Self = MDNode::get(Context, Args);
239 MDNode *Ref1 = MDNode::get(Context, Args);
240 MDNode *Ref2 = MDNode::get(Context, Args);
248 auto Temp = MDNode::getTemporary(Context, {});
249 Metadata *Args[] = {Temp.get(), MDNode::get(Context, {})};
250 MDNode *Self = MDNode::get(Context, Args);
257 MDNode *Ref1 = MDNode::get(Context, Args);
258 MDNode *Ref2 = MDNode::get(Context, Args);
265 Constant *C = ConstantInt::get(Type::getInt32Ty(Context), 7);
266 MDString *S = MDString::get(Context, "foo");
272 MDNode *N = MDNode::get(Context, Args);
308 TempMDNode Temp = MDNode::getTemporary(Context, Arg);
310 Module M("test", Context);
323 Constant *C = ConstantInt::get(Type::getInt32Ty(Context), 7);
324 MDString *S = MDString::get(Context, "foo");
330 MDNode *N = MDNode::get(Context, Args);
331 Module M("test", Context);
349 Module M("test", Context);
350 auto *FTy = FunctionType::get(Type::getVoidTy(Context), false);
353 auto *BB0 = BasicBlock::Create(Context, "entry", F0);
354 auto *BB1 = BasicBlock::Create(Context, "entry", F1);
355 auto *R0 = ReturnInst::Create(Context, BB0);
356 auto *R1 = ReturnInst::Create(Context, BB1);
357 auto *N0 = MDNode::getDistinct(Context, {});
358 auto *N1 = MDNode::getDistinct(Context, {});
371 Module M("test", Context);
374 Function::Create(FunctionType::get(Type::getVoidTy(Context),
375 Type::getMetadataTy(Context), false),
378 auto *FTy = FunctionType::get(Type::getVoidTy(Context), false);
381 auto *BB0 = BasicBlock::Create(Context, "entry", F0);
382 auto *BB1 = BasicBlock::Create(Context, "entry", F1);
383 auto *N0 = MDNode::getDistinct(Context, {});
384 auto *N1 = MDNode::getDistinct(Context, {});
385 auto *MAV0 = MetadataAsValue::get(Context, N0);
386 auto *MAV1 = MetadataAsValue::get(Context, N1);
407 Module M("test", Context);
409 auto *FTy = FunctionType::get(Type::getVoidTy(Context), false);
412 auto *BB0 = BasicBlock::Create(Context, "entry", F0);
417 auto *R0 = ReturnInst::Create(Context, BB0);
418 auto *N0 = MDNode::getDistinct(Context, {});
433 auto *Var = DILocalVariable::get(Context, Scope, "foo", File,
462 Context, dwarf::DW_TAG_pointer_type, "", nullptr, 0, nullptr, StructTy,
464 StructTy->replaceElements(MDTuple::get(Context, PointerTy));
466 auto *Var = DILocalVariable::get(Context, Scope, "foo", File,
491 MDNode *Empty = MDNode::get(Context, {});
495 MDNode *N = MDNode::get(Context, Ops);
504 MDNode *NullOp = MDNode::get(Context, Ops);
511 MDNode *Empty = MDNode::get(Context, {});
517 MDNode *Wrapped1 = MDNode::get(Context, Wrapped1Ops);
524 MDNode *Wrapped2 = MDNode::get(Context, Wrapped2Ops);
538 TempMDTuple T = MDTuple::getTemporary(Context, {});
542 MDTuple *N = MDTuple::get(Context, Ops);
548 ASSERT_EQ(N, MDTuple::get(Context, NullOps));
553 Type *Ty = PointerType::getUnqual(Context);
560 MDTuple *N = MDTuple::get(Context, Ops);
567 ASSERT_NE(N, MDTuple::get(Context, NullOps));
572 MDNode *Empty = MDNode::get(Context, {});
575 ASSERT_EQ(Empty, MDNode::get(Context, {}));
578 MDNode *Distinct1 = MDNode::getDistinct(Context, {});
579 MDNode *Distinct2 = MDNode::getDistinct(Context, {});
587 ASSERT_EQ(Empty, MDNode::get(Context, {}));
591 MDNode *U = MDTuple::get(Context, {});
592 MDNode *D = MDTuple::getDistinct(Context, {});
593 auto T = MDTuple::getTemporary(Context, {});
600 MDNode *U = MDTuple::get(Context, {});
601 MDNode *D = MDTuple::getDistinct(Context, {});
602 auto T = MDTuple::getTemporary(Context, {});
609 MDNode *U = MDTuple::get(Context, {});
610 MDNode *D = MDTuple::getDistinct(Context, {});
611 auto T = MDTuple::getTemporary(Context, {});
619 auto Temp = MDTuple::getTemporary(Context, {});
624 MDNode *Distinct = MDNode::getDistinct(Context, Ops);
629 MDNode *Empty = MDNode::get(Context, {});
636 MDNode *N0 = MDNode::get(Context, {});
639 auto Temp3 = MDTuple::getTemporary(Context, {});
641 MDNode *N1 = MDNode::get(Context, Ops1);
645 MDNode *N2 = MDNode::get(Context, Ops2);
649 MDNode *N3 = MDNode::get(Context, Ops3);
654 MDNode *N4 = MDNode::get(Context, Ops4);
668 MDNode *N5 = MDNode::getDistinct(Context, Ops5);
670 MDNode *N6 = MDNode::getDistinct(Context, Ops6);
703 auto Temp = MDTuple::getTemporary(Context, {});
706 MDNode *Empty = MDTuple::get(Context, ArrayRef<Metadata *>());
707 MDNode *N = MDTuple::get(Context, Ops);
724 auto *Empty = MDTuple::get(Context, {});
728 auto Temp = MDTuple::getTemporary(Context, Ops);
740 auto Temp = MDTuple::getTemporary(Context, Ops);
750 auto Unresolved = MDTuple::getTemporary(Context, {});
752 auto Temp = MDTuple::getTemporary(Context, Ops);
772 MDTuple *Op = MDTuple::getTemporary(Context, {}).release();
777 MDTuple *N = MDTuple::getTemporary(Context, Ops).release();
792 Type *Ty = PointerType::getUnqual(Context);
799 MDTuple *N = MDTuple::getTemporary(Context, Ops).release();
810 ASSERT_NE(N, MDTuple::get(Context, NullOps));
815 Type *Ty = PointerType::getUnqual(Context);
822 MDTuple *N = MDTuple::getTemporary(Context, Ops).release();
834 ASSERT_EQ(N, MDTuple::get(Context, NullOps));
839 auto *Empty = MDTuple::get(Context, {});
841 auto Temp = MDTuple::getTemporary(Context, Ops);
852 auto Unresolved = MDTuple::getTemporary(Context, {});
854 auto Temp = MDTuple::getTemporary(Context, Ops);
871 auto Temp = MDTuple::getTemporary(Context, Ops);
875 auto *U = MDTuple::get(Context, T);
891 EXPECT_EQ(U, MDTuple::get(Context, N));
896 EXPECT_EQ(U, MDNode::replaceWithPermanent(MDTuple::getTemporary(Context, N)));
900 auto Temp2 = MDTuple::getTemporary(Context, U);
911 auto Temp = MDTuple::getTemporary(Context, {});
922 DIScope *S = DILexicalBlock::get(Context, N, getFile(), 3, 4);
926 auto *A = DILocation::get(Context, 2, 7, N);
927 auto *B = DILocation::get(Context, 2, 7, N);
936 auto *A = DILocation::get(Context, 2, 7, N);
937 auto *B = DILocation::get(Context, 2, 7, S);
946 auto *A = DILocation::get(Context, 2, 7, N);
947 auto *B = DILocation::get(Context, 2, 10, S);
959 auto *A = DILocation::get(Context, 1, 6, N);
960 auto *B = DILocation::get(Context, 2, 7, N);
969 auto *A = DILocation::get(Context, 1, 6, N);
970 auto *B = DILocation::get(Context, 2, 7, S);
980 auto *SP1 = DISubprogram::getDistinct(Context, F, "a", "a", F, 0, nullptr,
983 auto *SP2 = DISubprogram::getDistinct(Context, F, "b", "b", F, 0, nullptr,
987 auto *I = DILocation::get(Context, 2, 7, N);
988 auto *A = DILocation::get(Context, 1, 6, SP1, I);
989 auto *B = DILocation::get(Context, 3, 8, SP2, I);
1000 auto *SP1 = DISubprogram::getDistinct(Context, F, "a", "a", F, 0, nullptr,
1003 auto *SP2 = DISubprogram::getDistinct(Context, F, "b", "b", F, 0, nullptr,
1007 auto *IA = DILocation::get(Context, 2, 7, N);
1008 auto *IB = DILocation::get(Context, 2, 8, N);
1009 auto *A = DILocation::get(Context, 1, 6, SP1, IA);
1010 auto *B = DILocation::get(Context, 3, 8, SP2, IB);
1020 auto *I = DILocation::get(Context, 2, 7, N);
1021 auto *A = DILocation::get(Context, 1, 6, S, I);
1022 auto *B = DILocation::get(Context, 2, 7, getSubprogram());
1037 auto *SPA = DISubprogram::getDistinct(Context, FA, "a", "a", FA, 0, nullptr,
1041 auto *SPB = DISubprogram::getDistinct(Context, FB, "b", "b", FB, 0, nullptr,
1045 auto *SPI = DISubprogram::getDistinct(Context, FI, "i", "i", FI, 0, nullptr,
1049 auto *I = DILocation::get(Context, 3, 8, SPI);
1050 auto *A = DILocation::get(Context, 2, 7, SPA, I);
1051 auto *B = DILocation::get(Context, 2, 7, SPB, I);
1067 auto *SPA = DISubprogram::getDistinct(Context, FA, "a", "a", FA, 0, nullptr,
1071 auto *SPB = DISubprogram::getDistinct(Context, FB, "b", "b", FB, 0, nullptr,
1075 auto *SPI = DISubprogram::getDistinct(Context, FI, "i", "i", FI, 0, nullptr,
1079 auto *SPAScope = DILexicalBlock::getDistinct(Context, SPA, FA, 4, 9);
1081 auto *I = DILocation::get(Context, 3, 8, SPI);
1082 auto *A = DILocation::get(Context, 2, 7, SPAScope, I);
1083 auto *B = DILocation::get(Context, 2, 7, SPB, I);
1100 auto *SPA = DISubprogram::getDistinct(Context, FA, "a", "a", FA, 0, nullptr,
1104 auto *SPB = DISubprogram::getDistinct(Context, FB, "b", "b", FB, 0, nullptr,
1108 auto *SPC = DISubprogram::getDistinct(Context, FC, "c", "c", FC, 0, nullptr,
1112 auto *A = DILocation::get(Context, 3, 2, SPA);
1113 auto *B = DILocation::get(Context, 2, 4, SPB, A);
1114 auto *C = DILocation::get(Context, 13, 2, SPC, B);
1130 auto *SPA = DISubprogram::getDistinct(Context, FA, "a", "a", FA, 0, nullptr,
1134 auto *SPB = DISubprogram::getDistinct(Context, FB, "b", "b", FB, 0, nullptr,
1138 auto *SPC = DISubprogram::getDistinct(Context, FC, "c", "c", FC, 0, nullptr,
1142 auto *A = DILocation::get(Context, 10, 20, SPA);
1143 auto *B1 = DILocation::get(Context, 3, 2, SPB, A);
1144 auto *B2 = DILocation::get(Context, 4, 5, SPB, A);
1145 auto *C1 = DILocation::get(Context, 2, 4, SPC, B1);
1146 auto *C2 = DILocation::get(Context, 2, 4, SPC, B2);
1168 auto *SPA = DISubprogram::getDistinct(Context, FA, "a", "a", FA, 0, nullptr,
1172 auto *SPI = DISubprogram::getDistinct(Context, FI, "i", "i", FI, 0, nullptr,
1177 auto *SPAScope1 = DILexicalBlock::getDistinct(Context, SPA, FA, 4, 9);
1181 DILexicalBlock::getDistinct(Context, SPAScope1, FA, 10, 12);
1185 DILexicalBlock::getDistinct(Context, SPAScope1, FA, 20, 8);
1187 DILexicalBlock::getDistinct(Context, SPAScope3, FA, 21, 12);
1189 auto *I = DILocation::get(Context, 3, 8, SPI);
1190 auto *A1 = DILocation::get(Context, 12, 7, SPAScope2, I);
1191 auto *A2 = DILocation::get(Context, 21, 15, SPAScope4, I);
1208 auto *SPA = DISubprogram::getDistinct(Context, FA, "a", "a", FA, 0, nullptr,
1212 auto *SPB = DISubprogram::getDistinct(Context, FB, "b", "b", FB, 0, nullptr,
1216 auto *SPI = DISubprogram::getDistinct(Context, FI, "i", "i", FI, 0, nullptr,
1220 auto *SPAScope1 = DILexicalBlock::getDistinct(Context, SPA, FA, 4, 9);
1221 auto *SPAScope2 = DILexicalBlock::getDistinct(Context, SPA, FA, 8, 3);
1227 InlinedAt = DILocation::get(Context, 3 + i, 8 + i, SPI, InlinedAt);
1230 auto *A1 = DILocation::get(Context, 5, 9, SPAScope1, InlinedAt);
1231 auto *A2 = DILocation::get(Context, 9, 8, SPAScope2, InlinedAt);
1232 auto *B = DILocation::get(Context, 10, 3, SPB, A1);
1248 DILocation *L0 = DILocation::getDistinct(Context, 2, 7, N);
1250 DILocation *L1 = DILocation::get(Context, 2, 7, N);
1252 EXPECT_EQ(L1, DILocation::get(Context, 2, 7, N));
1256 MDNode *N = MDNode::get(Context, {});
1257 auto L = DILocation::getTemporary(Context, 2, 7, N);
1263 MDNode *N = MDNode::get(Context, {});
1264 auto L = DILocation::getTemporary(Context, 2, 7, N);
1328 auto L1 = DILocation::get(Context, 1, 2, getSubprogram());
1373 auto *Empty = MDNode::get(Context, {});
1375 auto *N = GenericDINode::get(Context, 15, Header, Ops1);
1379 EXPECT_EQ(MDString::get(Context, Header), N->getOperand(0));
1385 EXPECT_EQ(N, GenericDINode::get(Context, 15, Header, Ops1));
1394 EXPECT_EQ(N, GenericDINode::get(Context, 15, Header, Ops2));
1401 EXPECT_EQ(N, GenericDINode::get(Context, 15, Header, Ops1));
1409 auto *N = GenericDINode::get(Context, 15, StringRef(), {});
1417 auto *N = DISubrange::get(Context, 5, 7);
1425 EXPECT_EQ(N, DISubrange::get(Context, 5, 7));
1426 EXPECT_EQ(DISubrange::get(Context, 5, 0), DISubrange::get(Context, 5));
1433 auto *N = DISubrange::get(Context, -1, 0);
1441 EXPECT_EQ(N, DISubrange::get(Context, -1, 0));
1449 auto *VlaExpr = DILocalVariable::get(Context, Scope, "vla_expr", File, 8,
1452 auto *N = DISubrange::get(Context, VlaExpr, 0);
1461 EXPECT_EQ(N, DISubrange::get(Context, VlaExpr, 0));
1470 ConstantInt::getSigned(Type::getInt64Ty(Context), -10));
1472 ConstantInt::getSigned(Type::getInt64Ty(Context), 10));
1474 ConstantInt::getSigned(Type::getInt64Ty(Context), 4));
1476 ConstantInt::getSigned(Type::getInt64Ty(Context), 20));
1477 auto *UVother = DILocalVariable::get(Context, Scope, "ubother", File, 8, Type,
1479 auto *UEother = DIExpression::get(Context, {5, 6});
1481 ConstantInt::getSigned(Type::getInt64Ty(Context), 0));
1483 ConstantInt::getSigned(Type::getInt64Ty(Context), 0));
1485 auto *N = DISubrange::get(Context, nullptr, LI, UI, SI);
1502 EXPECT_EQ(N, DISubrange::get(Context, nullptr, LI, UI, SI));
1504 EXPECT_NE(N, DISubrange::get(Context, nullptr, LI, UIother, SI));
1505 EXPECT_NE(N, DISubrange::get(Context, nullptr, LI, UEother, SI));
1506 EXPECT_NE(N, DISubrange::get(Context, nullptr, LI, UVother, SI));
1508 auto *NZeroLower = DISubrange::get(Context, nullptr, LIZero, UI, SI);
1509 EXPECT_NE(NZeroLower, DISubrange::get(Context, nullptr, nullptr, UI, SI));
1511 auto *NZeroUpper = DISubrange::get(Context, nullptr, LI, UIZero, SI);
1512 EXPECT_NE(NZeroUpper, DISubrange::get(Context, nullptr, LI, nullptr, SI));
1521 DILocalVariable::get(Context, Scope, "lb", File, 8, Type, 2, Flags, 8,
1524 DILocalVariable::get(Context, Scope, "ub", File, 8, Type, 2, Flags, 8,
1527 DILocalVariable::get(Context, Scope, "st", File, 8, Type, 2, Flags, 8,
1529 auto *SVother = DILocalVariable::get(Context, Scope, "stother", File, 8, Type,
1532 ConstantInt::getSigned(Type::getInt64Ty(Context), 20));
1533 auto *SEother = DIExpression::get(Context, {5, 6});
1535 auto *N = DISubrange::get(Context, nullptr, LV, UV, SV);
1552 EXPECT_EQ(N, DISubrange::get(Context, nullptr, LV, UV, SV));
1554 EXPECT_NE(N, DISubrange::get(Context, nullptr, LV, UV, SVother));
1555 EXPECT_NE(N, DISubrange::get(Context, nullptr, LV, UV, SEother));
1556 EXPECT_NE(N, DISubrange::get(Context, nullptr, LV, UV, SIother));
1564 auto *LE = DIExpression::get(Context, {1, 2});
1565 auto *UE = DIExpression::get(Context, {2, 3});
1566 auto *SE = DIExpression::get(Context, {3, 4});
1567 auto *LEother = DIExpression::get(Context, {5, 6});
1569 ConstantInt::getSigned(Type::getInt64Ty(Context), 20));
1570 auto *LVother = DILocalVariable::get(Context, Scope, "lbother", File, 8, Type,
1573 auto *N = DISubrange::get(Context, nullptr, LE, UE, SE);
1590 EXPECT_EQ(N, DISubrange::get(Context, nullptr, LE, UE, SE));
1592 EXPECT_NE(N, DISubrange::get(Context, nullptr, LEother, UE, SE));
1593 EXPECT_NE(N, DISubrange::get(Context, nullptr, LIother, UE, SE));
1594 EXPECT_NE(N, DISubrange::get(Context, nullptr, LVother, UE, SE));
1605 Context, {dwarf::DW_OP_consts, static_cast<uint64_t>(-10)});
1606 auto *UI = DIExpression::get(Context, {dwarf::DW_OP_consts, 10});
1607 auto *SI = DIExpression::get(Context, {dwarf::DW_OP_consts, 4});
1608 auto *UIother = DIExpression::get(Context, {dwarf::DW_OP_consts, 20});
1609 auto *UVother = DILocalVariable::get(Context, Scope, "ubother", File, 8, Type,
1611 auto *UEother = DIExpression::get(Context, {5, 6});
1612 auto *LIZero = DIExpression::get(Context, {dwarf::DW_OP_consts, 0});
1613 auto *UIZero = DIExpression::get(Context, {dwarf::DW_OP_consts, 0});
1615 auto *N = DIGenericSubrange::get(Context, nullptr, LI, UI, SI);
1632 EXPECT_EQ(N, DIGenericSubrange::get(Context, nullptr, LI, UI, SI));
1634 EXPECT_NE(N, DIGenericSubrange::get(Context, nullptr, LI, UIother, SI));
1635 EXPECT_NE(N, DIGenericSubrange::get(Context, nullptr, LI, UEother, SI));
1636 EXPECT_NE(N, DIGenericSubrange::get(Context, nullptr, LI, UVother, SI));
1638 auto *NZeroLower = DIGenericSubrange::get(Context, nullptr, LIZero, UI, SI);
1640 DIGenericSubrange::get(Context, nullptr, nullptr, UI, SI));
1642 auto *NZeroUpper = DIGenericSubrange::get(Context, nullptr, LI, UIZero, SI);
1644 DIGenericSubrange::get(Context, nullptr, LI, nullptr, SI));
1653 DILocalVariable::get(Context, Scope, "lb", File, 8, Type, 2, Flags, 8,
1656 DILocalVariable::get(Context, Scope, "ub", File, 8, Type, 2, Flags, 8,
1659 DILocalVariable::get(Context, Scope, "st", File, 8, Type, 2, Flags, 8,
1661 auto *SVother = DILocalVariable::get(Context, Scope, "stother", File, 8, Type,
1664 Context, {dwarf::DW_OP_consts, static_cast<uint64_t>(-1)});
1665 auto *SEother = DIExpression::get(Context, {5, 6});
1667 auto *N = DIGenericSubrange::get(Context, nullptr, LV, UV, SV);
1684 EXPECT_EQ(N, DIGenericSubrange::get(Context, nullptr, LV, UV, SV));
1686 EXPECT_NE(N, DIGenericSubrange::get(Context, nullptr, LV, UV, SVother));
1687 EXPECT_NE(N, DIGenericSubrange::get(Context, nullptr, LV, UV, SEother));
1688 EXPECT_NE(N, DIGenericSubrange::get(Context, nullptr, LV, UV, SIother));
1697 DILocalVariable::get(Context, Scope, "lb", File, 8, Type, 2, Flags, 8, nullptr);
1698 auto *UE = DIExpression::get(Context, {2, 3});
1699 auto *SE = DIExpression::get(Context, {3, 4});
1701 auto *LVother = DILocalVariable::get(Context, Scope, "lbother", File, 8, Type,
1704 Context, {dwarf::DW_OP_consts, static_cast<uint64_t>(-1)});
1706 Module M("M", Context);
1748 auto *N = DIEnumerator::get(Context, 7, false, "name");
1753 EXPECT_EQ(N, DIEnumerator::get(Context, 7, false, "name"));
1755 EXPECT_NE(N, DIEnumerator::get(Context, 7, true, "name"));
1756 EXPECT_NE(N, DIEnumerator::get(Context, 8, false, "name"));
1757 EXPECT_NE(N, DIEnumerator::get(Context, 7, false, "nam"));
1764 auto *N = DIEnumerator::get(Context, APInt::getMaxValue(128), false, "val");
1767 DIEnumerator::get(Context, APInt::getMaxValue(128), false, "val"));
1769 DIEnumerator::get(Context, APInt::getMinValue(128), false, "val"));
1775 auto *N = DIBasicType::get(Context, dwarf::DW_TAG_base_type, "special", 33,
1785 EXPECT_EQ(N, DIBasicType::get(Context, dwarf::DW_TAG_base_type, "special", 33,
1788 EXPECT_NE(N, DIBasicType::get(Context, dwarf::DW_TAG_unspecified_type,
1790 EXPECT_NE(N, DIBasicType::get(Context, dwarf::DW_TAG_base_type, "s", 33, 26,
1792 EXPECT_NE(N, DIBasicType::get(Context, dwarf::DW_TAG_base_type, "special", 32,
1794 EXPECT_NE(N, DIBasicType::get(Context, dwarf::DW_TAG_base_type, "special", 33,
1797 EXPECT_NE(N, DIBasicType::get(Context, dwarf::DW_TAG_base_type, "special", 33,
1799 EXPECT_NE(N, DIBasicType::get(Context, dwarf::DW_TAG_base_type, "special", 33,
1801 EXPECT_NE(N, DIBasicType::get(Context, dwarf::DW_TAG_base_type, "special", 33,
1803 EXPECT_NE(N, DIBasicType::get(Context, dwarf::DW_TAG_base_type, "special", 33,
1812 DIBasicType::get(Context, dwarf::DW_TAG_base_type, "special", UINT64_MAX,
1821 DIBasicType::get(Context, dwarf::DW_TAG_unspecified_type, "unspecified");
1835 DIType *N = DIBasicType::get(Context, dwarf::DW_TAG_base_type, "int", 32, 32,
1845 Metadata *Types = MDTuple::get(Context, TypesOps);
1848 DISubroutineType::getDistinct(Context, DINode::FlagZero, 0, Types);
1855 DISubroutineType::getTemporary(Context, DINode::FlagZero, 0, Types);
1876 Context, dwarf::DW_TAG_pointer_type, "something", File, 1, Scope,
1878 auto *N1 = DIDerivedType::get(Context, dwarf::DW_TAG_LLVM_ptrauth_type, "",
1896 EXPECT_EQ(N, DIDerivedType::get(Context, dwarf::DW_TAG_pointer_type,
1901 EXPECT_NE(N, DIDerivedType::get(Context, dwarf::DW_TAG_reference_type,
1905 EXPECT_NE(N, DIDerivedType::get(Context, dwarf::DW_TAG_pointer_type, "else",
1909 EXPECT_NE(N, DIDerivedType::get(Context, dwarf::DW_TAG_pointer_type,
1913 EXPECT_NE(N, DIDerivedType::get(Context, dwarf::DW_TAG_pointer_type,
1917 EXPECT_NE(N, DIDerivedType::get(Context, dwarf::DW_TAG_pointer_type,
1922 Context, dwarf::DW_TAG_pointer_type, "something", File, 1,
1925 EXPECT_NE(N, DIDerivedType::get(Context, dwarf::DW_TAG_pointer_type,
1929 EXPECT_NE(N, DIDerivedType::get(Context, dwarf::DW_TAG_pointer_type,
1933 EXPECT_NE(N, DIDerivedType::get(Context, dwarf::DW_TAG_pointer_type,
1937 EXPECT_NE(N, DIDerivedType::get(Context, dwarf::DW_TAG_pointer_type,
1942 DIDerivedType::get(Context, dwarf::DW_TAG_LLVM_ptrauth_type, "",
1945 EXPECT_NE(N, DIDerivedType::get(Context, dwarf::DW_TAG_pointer_type,
1949 EXPECT_NE(N, DIDerivedType::get(Context, dwarf::DW_TAG_pointer_type,
1967 auto *N = DIDerivedType::get(Context, dwarf::DW_TAG_pointer_type, "something",
1977 Context, dwarf::DW_TAG_LLVM_ptrauth_type, "", File, 1, Scope, N,
2005 auto *N = DICompositeType::get(Context, Tag, Name, File, Line, Scope,
2025 EXPECT_EQ(N, DICompositeType::get(Context, Tag, Name, File, Line, Scope,
2030 EXPECT_NE(N, DICompositeType::get(Context, Tag + 1, Name, File, Line, Scope,
2034 EXPECT_NE(N, DICompositeType::get(Context, Tag, "abc", File, Line, Scope,
2038 EXPECT_NE(N, DICompositeType::get(Context, Tag, Name, getFile(), Line, Scope,
2042 EXPECT_NE(N, DICompositeType::get(Context, Tag, Name, File, Line + 1, Scope,
2047 Context, Tag, Name, File, Line, getSubprogram(), BaseType,
2051 Context, Tag, Name, File, Line, Scope, getBasicType("other"),
2054 EXPECT_NE(N, DICompositeType::get(Context, Tag, Name, File, Line, Scope,
2058 EXPECT_NE(N, DICompositeType::get(Context, Tag, Name, File, Line, Scope,
2063 Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits,
2068 Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits,
2072 Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits,
2076 Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits,
2080 Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits,
2083 EXPECT_NE(N, DICompositeType::get(Context, Tag, Name, File, Line, Scope,
2087 EXPECT_NE(N, DICompositeType::get(Context, Tag, Name, File, Line, Scope,
2093 EXPECT_FALSE(DICompositeType::get(Context, Tag, Name, File, Line, Scope,
2098 EXPECT_FALSE(DICompositeType::get(Context, Tag, Name, File, Line, Scope,
2125 auto *N = DICompositeType::get(Context, Tag, Name, File, Line, Scope,
2149 Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits, AlignInBits,
2152 auto *Elements = MDTuple::getDistinct(Context, {});
2171 auto *TemplateParams = MDTuple::getDistinct(Context, {});
2198 Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits, AlignInBits,
2204 Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits, AlignInBits,
2208 Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits, AlignInBits,
2212 Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits, AlignInBits,
2238 Metadata *DlVar1 = DILocalVariable::get(Context, Scope, "dl_var1", File, 8,
2240 Metadata *DlVar2 = DILocalVariable::get(Context, Scope, "dl_var2", File, 8,
2243 Metadata *DataLocation1 = DIExpression::get(Context, Elements1);
2246 Metadata *DataLocation2 = DIExpression::get(Context, Elements2);
2249 Metadata *Rank1 = DIExpression::get(Context, Elements3);
2252 Metadata *Rank2 = DIExpression::get(Context, Elements4);
2254 ConstantInt *RankInt1 = ConstantInt::get(Context, APInt(7, 0));
2256 ConstantInt *RankInt2 = ConstantInt::get(Context, APInt(6, 0));
2259 Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits, AlignInBits,
2264 Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits, AlignInBits,
2269 Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits, AlignInBits,
2278 Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits, AlignInBits,
2283 Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits, AlignInBits,
2288 Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits, AlignInBits,
2297 Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits, AlignInBits,
2302 Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits, AlignInBits,
2307 Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits, AlignInBits,
2316 Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits, AlignInBits,
2321 Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits, AlignInBits,
2326 Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits, AlignInBits,
2342 auto *N = DISubroutineType::get(Context, Flags, 0, TypeArray);
2346 EXPECT_EQ(N, DISubroutineType::get(Context, Flags, 0, TypeArray));
2348 EXPECT_NE(N, DISubroutineType::get(Context, FlagsPOne, 0, TypeArray));
2349 EXPECT_NE(N, DISubroutineType::get(Context, Flags, 0, getTuple()));
2353 Context, Flags, dwarf::DW_CC_BORLAND_msfastcall, TypeArray);
2354 auto *Std = DISubroutineType::get(Context, Flags,
2357 DISubroutineType::get(Context, Flags,
2360 Context, Flags, dwarf::DW_CC_BORLAND_stdcall, TypeArray));
2384 auto *N = DIFile::get(Context, Filename, Directory, Checksum, Source);
2391 EXPECT_EQ(N, DIFile::get(Context, Filename, Directory, Checksum, Source));
2393 EXPECT_NE(N, DIFile::get(Context, "other", Directory, Checksum, Source));
2394 EXPECT_NE(N, DIFile::get(Context, Filename, "other", Checksum, Source));
2397 N, DIFile::get(Context, Filename, Directory, OtherChecksum));
2399 EXPECT_NE(N, DIFile::get(Context, Filename, Directory, Checksum, OtherSource));
2400 EXPECT_NE(N, DIFile::get(Context, Filename, Directory, Checksum));
2401 EXPECT_NE(N, DIFile::get(Context, Filename, Directory));
2408 DIFile *N = DIFile::get(Context, "file", "dir");
2413 N = DIFile::get(Context, "file", "dir", Checksum, Source);
2417 N = DIFile::get(Context, "file", "dir", Checksum, Source);
2423 DIScope *N = DIFile::get(Context, "file", "dir");
2447 Context, SourceLanguage, File, Producer, IsOptimized, Flags,
2503 MDTuple *EnumTypes = MDTuple::getDistinct(Context, {});
2504 MDTuple *RetainedTypes = MDTuple::getDistinct(Context, {});
2505 MDTuple *ImportedEntities = MDTuple::getDistinct(Context, {});
2510 Context, SourceLanguage, File, Producer, IsOptimized, Flags,
2515 auto *GlobalVariables = MDTuple::getDistinct(Context, {});
2522 auto *Macros = MDTuple::getDistinct(Context, {});
2562 Context, Scope, Name, LinkageName, File, Line, Type, ScopeLine,
2590 EXPECT_EQ(N, DISubprogram::get(Context, Scope, Name, LinkageName, File, Line,
2596 EXPECT_NE(N, DISubprogram::get(Context, getCompositeType(), Name, LinkageName,
2602 EXPECT_NE(N, DISubprogram::get(Context, Scope, "other", LinkageName, File,
2608 EXPECT_NE(N, DISubprogram::get(Context, Scope, Name, "other", File, Line,
2613 EXPECT_NE(N, DISubprogram::get(Context, Scope, Name, LinkageName, getFile(),
2619 EXPECT_NE(N, DISubprogram::get(Context, Scope, Name, LinkageName, File,
2625 EXPECT_NE(N, DISubprogram::get(Context, Scope, Name, LinkageName, File, Line,
2632 Context, Scope, Name, LinkageName, File, Line, Type,
2638 Context, Scope, Name, LinkageName, File, Line, Type,
2643 EXPECT_NE(N, DISubprogram::get(Context, Scope, Name, LinkageName, File, Line,
2649 EXPECT_NE(N, DISubprogram::get(Context, Scope, Name, LinkageName, File, Line,
2656 Context, Scope, Name, LinkageName, File, Line, Type,
2661 EXPECT_NE(N, DISubprogram::get(Context, Scope, Name, LinkageName, File, Line,
2668 Context, Scope, Name, LinkageName, File, Line, Type,
2673 EXPECT_NE(N, DISubprogram::get(Context, Scope, Name, LinkageName, File, Line,
2679 DISubprogram::get(Context, Scope, Name, LinkageName, File, Line,
2684 EXPECT_NE(N, DISubprogram::get(Context, Scope, Name, LinkageName, File, Line,
2689 EXPECT_NE(N, DISubprogram::get(Context, Scope, Name, LinkageName, File, Line,
2694 EXPECT_NE(N, DISubprogram::get(Context, Scope, Name, LinkageName, File, Line,
2699 EXPECT_NE(N, DISubprogram::get(Context, Scope, Name, LinkageName, File, Line,
2704 EXPECT_NE(N, DISubprogram::get(Context, Scope, Name, LinkageName, File, Line,
2722 auto *N = DILexicalBlock::get(Context, Scope, File, Line, Column);
2729 EXPECT_EQ(N, DILexicalBlock::get(Context, Scope, File, Line, Column));
2732 DILexicalBlock::get(Context, getSubprogram(), File, Line, Column));
2733 EXPECT_NE(N, DILexicalBlock::get(Context, Scope, getFile(), Line, Column));
2734 EXPECT_NE(N, DILexicalBlock::get(Context, Scope, File, Line + 1, Column));
2735 EXPECT_NE(N, DILexicalBlock::get(Context, Scope, File, Line, Column + 1));
2745 auto *LB = DILexicalBlock::get(Context, SP, F, 2, 7);
2751 auto *LB = DILexicalBlock::get(Context, SP, F, UINT32_MAX, U16 - 1);
2756 auto *LB = DILexicalBlock::get(Context, SP, F, UINT32_MAX, U16);
2761 auto *LB = DILexicalBlock::get(Context, SP, F, UINT32_MAX, U16 + 1);
2774 auto *N = DILexicalBlockFile::get(Context, Scope, File, Discriminator);
2780 EXPECT_EQ(N, DILexicalBlockFile::get(Context, Scope, File, Discriminator));
2782 EXPECT_NE(N, DILexicalBlockFile::get(Context, getSubprogram(), File,
2785 DILexicalBlockFile::get(Context, Scope, getFile(), Discriminator));
2787 DILexicalBlockFile::get(Context, Scope, File, Discriminator + 1));
2800 auto *N = DINamespace::get(Context, Scope, Name, ExportSymbols);
2805 EXPECT_EQ(N, DINamespace::get(Context, Scope, Name, ExportSymbols));
2806 EXPECT_NE(N, DINamespace::get(Context, getFile(), Name, ExportSymbols));
2807 EXPECT_NE(N, DINamespace::get(Context, Scope, "other", ExportSymbols));
2808 EXPECT_NE(N, DINamespace::get(Context, Scope, Name, !ExportSymbols));
2826 auto *N = DIModule::get(Context, File, Scope, Name, ConfigMacro, Includes,
2838 EXPECT_EQ(N, DIModule::get(Context, File, Scope, Name, ConfigMacro, Includes,
2840 EXPECT_NE(N, DIModule::get(Context, getFile(), getFile(), Name, ConfigMacro,
2842 EXPECT_NE(N, DIModule::get(Context, File, Scope, "other", ConfigMacro,
2844 EXPECT_NE(N, DIModule::get(Context, File, Scope, Name, "other", Includes,
2846 EXPECT_NE(N, DIModule::get(Context, File, Scope, Name, ConfigMacro, "other",
2848 EXPECT_NE(N, DIModule::get(Context, File, Scope, Name, ConfigMacro, Includes,
2850 EXPECT_NE(N, DIModule::get(Context, getFile(), Scope, Name, ConfigMacro,
2852 EXPECT_NE(N, DIModule::get(Context, File, Scope, Name, ConfigMacro, Includes,
2854 EXPECT_NE(N, DIModule::get(Context, File, Scope, Name, ConfigMacro, Includes,
2868 auto *N = DITemplateTypeParameter::get(Context, Name, Type, defaulted);
2873 EXPECT_EQ(N, DITemplateTypeParameter::get(Context, Name, Type, defaulted));
2875 EXPECT_NE(N, DITemplateTypeParameter::get(Context, "other", Type, defaulted));
2876 EXPECT_NE(N, DITemplateTypeParameter::get(Context, Name,
2878 EXPECT_NE(N, DITemplateTypeParameter::get(Context, Name, Type, true));
2894 DITemplateValueParameter::get(Context, Tag, Name, Type, defaulted, Value);
2899 EXPECT_EQ(N, DITemplateValueParameter::get(Context, Tag, Name, Type,
2903 Context, dwarf::DW_TAG_GNU_template_template_param, Name,
2905 EXPECT_NE(N, DITemplateValueParameter::get(Context, Tag, "other", Type,
2907 EXPECT_NE(N, DITemplateValueParameter::get(Context, Tag, Name,
2911 DITemplateValueParameter::get(Context, Tag, Name, Type, defaulted,
2914 N, DITemplateValueParameter::get(Context, Tag, Name, Type, true, Value));
2938 Context, Scope, Name, LinkageName, File, Line, Type, IsLocalToUnit,
2954 EXPECT_EQ(N, DIGlobalVariable::get(Context, Scope, Name, LinkageName, File,
2960 Context, getSubprogram(), Name, LinkageName, File, Line,
2964 EXPECT_NE(N, DIGlobalVariable::get(Context, Scope, "other", LinkageName, File,
2968 EXPECT_NE(N, DIGlobalVariable::get(Context, Scope, Name, "other", File, Line,
2972 EXPECT_NE(N, DIGlobalVariable::get(Context, Scope, Name, LinkageName,
2976 EXPECT_NE(N, DIGlobalVariable::get(Context, Scope, Name, LinkageName, File,
2980 EXPECT_NE(N, DIGlobalVariable::get(Context, Scope, Name, LinkageName, File,
2984 EXPECT_NE(N, DIGlobalVariable::get(Context, Scope, Name, LinkageName, File,
2988 EXPECT_NE(N, DIGlobalVariable::get(Context, Scope, Name, LinkageName, File,
2992 EXPECT_NE(N, DIGlobalVariable::get(Context, Scope, Name, LinkageName, File,
2996 EXPECT_NE(N, DIGlobalVariable::get(Context, Scope, Name, LinkageName, File,
3000 EXPECT_NE(N, DIGlobalVariable::get(Context, Scope, Name, LinkageName, File,
3022 auto *Expr = DIExpression::get(Context, {1, 2});
3023 auto *Expr2 = DIExpression::get(Context, {1, 2, 3});
3029 Context, Scope, Name, LinkageName, File, Line, Type, IsLocalToUnit,
3033 Context, Scope, "other", LinkageName, File, Line, Type, IsLocalToUnit,
3036 auto *N = DIGlobalVariableExpression::get(Context, Var, Expr);
3040 EXPECT_EQ(N, DIGlobalVariableExpression::get(Context, Var, Expr));
3041 EXPECT_NE(N, DIGlobalVariableExpression::get(Context, Var2, Expr));
3042 EXPECT_NE(N, DIGlobalVariableExpression::get(Context, Var, Expr2));
3061 DILocalVariable::get(Context, Scope, Name, File, Line, Type, Arg, Flags,
3072 EXPECT_EQ(N, DILocalVariable::get(Context, Scope, Name, File, Line, Type, Arg,
3076 DILocalVariable::get(Context, Scope, Name, File, Line, Type, 0, Flags,
3078 EXPECT_NE(N, DILocalVariable::get(Context, getSubprogram(), Name, File, Line,
3080 EXPECT_NE(N, DILocalVariable::get(Context, Scope, "other", File, Line, Type,
3082 EXPECT_NE(N, DILocalVariable::get(Context, Scope, Name, getFile(), Line, Type,
3084 EXPECT_NE(N, DILocalVariable::get(Context, Scope, Name, File, Line + 1, Type,
3086 EXPECT_NE(N, DILocalVariable::get(Context, Scope, Name, File, Line,
3089 EXPECT_NE(N, DILocalVariable::get(Context, Scope, Name, File, Line, Type,
3091 EXPECT_NE(N, DILocalVariable::get(Context, Scope, Name, File, Line, Type,
3099 EXPECT_EQ(255u, DILocalVariable::get(Context, getSubprogram(), "", getFile(),
3103 EXPECT_EQ(256u, DILocalVariable::get(Context, getSubprogram(), "", getFile(),
3107 EXPECT_EQ(257u, DILocalVariable::get(Context, getSubprogram(), "", getFile(),
3112 EXPECT_EQ(Max, DILocalVariable::get(Context, getSubprogram(), "", getFile(),
3122 auto *N = DIExpression::get(Context, Elements);
3124 EXPECT_EQ(N, DIExpression::get(Context, Elements));
3138 auto *N0 = DIExpression::get(Context, Elts0);
3149 auto *N1 = DIExpression::get(Context, Elts1);
3163 auto *Expr = DIExpression::get(Context, Ops);
3166 auto *EmptyExpr = DIExpression::get(Context, ResOps);
3174 Expr = DIExpression::get(Context, Ops);
3183 Expr = DIExpression::get(Context, Ops);
3192 Expr = DIExpression::get(Context, Ops);
3201 Expr = DIExpression::get(Context, Ops);
3210 Expr = DIExpression::get(Context, Ops);
3219 Expr = DIExpression::get(Context, Ops);
3230 Expr = DIExpression::get(Context, Ops);
3234 auto *ResExpr = DIExpression::get(Context, ResOps);
3244 Expr = DIExpression::get(Context, Ops);
3249 ResExpr = DIExpression::get(Context, ResOps);
3260 Expr = DIExpression::get(Context, Ops);
3265 ResExpr = DIExpression::get(Context, ResOps);
3276 Expr = DIExpression::get(Context, Ops);
3281 ResExpr = DIExpression::get(Context, ResOps);
3292 Expr = DIExpression::get(Context, Ops);
3297 ResExpr = DIExpression::get(Context, ResOps);
3308 Expr = DIExpression::get(Context, Ops);
3313 ResExpr = DIExpression::get(Context, ResOps);
3324 Expr = DIExpression::get(Context, Ops);
3329 ResExpr = DIExpression::get(Context, ResOps);
3340 Expr = DIExpression::get(Context, Ops);
3345 ResExpr = DIExpression::get(Context, ResOps);
3356 Expr = DIExpression::get(Context, Ops);
3361 ResExpr = DIExpression::get(Context, ResOps);
3372 Expr = DIExpression::get(Context, Ops);
3377 ResExpr = DIExpression::get(Context, ResOps);
3389 Expr = DIExpression::get(Context, Ops);
3394 ResExpr = DIExpression::get(Context, ResOps);
3406 Expr = DIExpression::get(Context, Ops);
3412 ResExpr = DIExpression::get(Context, ResOps);
3427 Expr = DIExpression::get(Context, Ops);
3435 ResExpr = DIExpression::get(Context, ResOps);
3450 Expr = DIExpression::get(Context, Ops);
3458 ResExpr = DIExpression::get(Context, ResOps);
3474 Expr = DIExpression::get(Context, Ops);
3482 ResExpr = DIExpression::get(Context, ResOps);
3498 Expr = DIExpression::get(Context, Ops);
3507 ResExpr = DIExpression::get(Context, ResOps);
3516 Expr = DIExpression::get(Context, Ops);
3523 ResExpr = DIExpression::get(Context, ResOps);
3533 Expr = DIExpression::get(Context, Ops);
3541 ResExpr = DIExpression::get(Context, ResOps);
3551 Expr = DIExpression::get(Context, Ops);
3559 ResExpr = DIExpression::get(Context, ResOps);
3569 Expr = DIExpression::get(Context, Ops);
3577 ResExpr = DIExpression::get(Context, ResOps);
3587 Expr = DIExpression::get(Context, Ops);
3595 ResExpr = DIExpression::get(Context, ResOps);
3605 Expr = DIExpression::get(Context, Ops);
3612 ResExpr = DIExpression::get(Context, ResOps);
3621 auto *Expr = DIExpression::get(Context, Ops);
3627 auto *ResExpr = DIExpression::get(Context, OpsRes);
3641 ResExpr = DIExpression::get(Context, OpsRes);
3655 ResExpr = DIExpression::get(Context, OpsRes);
3669 ResExpr = DIExpression::get(Context, OpsRes);
3683 ResExpr = DIExpression::get(Context, OpsRes);
3697 ResExpr = DIExpression::get(Context, OpsRes);
3708 Expr = DIExpression::get(Context, Ops);
3720 ResExpr = DIExpression::get(Context, OpsRes);
3735 ResExpr = DIExpression::get(Context, OpsRes);
3750 ResExpr = DIExpression::get(Context, OpsRes);
3758 EXPECT_TRUE(DIExpression::get(Context, Elements)->isValid()); \
3763 EXPECT_FALSE(DIExpression::get(Context, Elements)->isValid()); \
3767 EXPECT_TRUE(DIExpression::get(Context, {})->isValid());
3804 DIExpression *Expression = DIExpression::get(Context, Elements); \
3812 DIExpression *Expression = DIExpression::get(Context, Elements); \
3820 DIExpression::get(Context, {}), 0, 32);
3882 DIExpression::get(Context, {__VA_ARGS__}) \
3962 #define GET_EXPR(...) DIExpression::get(Context, {__VA_ARGS__})
4028 #define GET_EXPR(...) DIExpression::get(Context, {__VA_ARGS__})
4089 #define GET_EXPR(...) DIExpression::get(Context, {__VA_ARGS__})
4163 Context, {dwarf::DW_OP_LLVM_arg, 0, dwarf::DW_OP_LLVM_arg, 1,
4186 #define GET_EXPR(...) DIExpression::get(Context, {__VA_ARGS__})
4233 ConstantInt::get(Context, APInt(StartWidth, StartValue, StartIsSigned)); \
4240 Expr = DIExpression::get(Context, {dwarf::DW_OP_deref});
4248 Context, {dwarf::DW_OP_LLVM_convert, 72, dwarf::DW_ATE_unsigned});
4253 Context, {dwarf::DW_OP_LLVM_convert, 8, dwarf::DW_ATE_unsigned,
4259 Context, {dwarf::DW_OP_LLVM_convert, 32, dwarf::DW_ATE_signed});
4266 Context, {dwarf::DW_OP_LLVM_convert, 32, dwarf::DW_ATE_signed});
4276 DIExpression *Expr = DIExpression::get(Context, {});
4307 auto *N = DIObjCProperty::get(Context, Name, File, Line, GetterName,
4318 EXPECT_EQ(N, DIObjCProperty::get(Context, Name, File, Line, GetterName,
4321 EXPECT_NE(N, DIObjCProperty::get(Context, "other", File, Line, GetterName,
4323 EXPECT_NE(N, DIObjCProperty::get(Context, Name, getFile(), Line, GetterName,
4325 EXPECT_NE(N, DIObjCProperty::get(Context, Name, File, Line + 1, GetterName,
4327 EXPECT_NE(N, DIObjCProperty::get(Context, Name, File, Line, "other",
4329 EXPECT_NE(N, DIObjCProperty::get(Context, Name, File, Line, GetterName,
4331 EXPECT_NE(N, DIObjCProperty::get(Context, Name, File, Line, GetterName,
4333 EXPECT_NE(N, DIObjCProperty::get(Context, Name, File, Line, GetterName,
4352 DIImportedEntity::get(Context, Tag, Scope, Entity, File, Line, Name);
4361 N, DIImportedEntity::get(Context, Tag, Scope, Entity, File, Line, Name));
4364 DIImportedEntity::get(Context, dwarf::DW_TAG_imported_declaration,
4366 EXPECT_NE(N, DIImportedEntity::get(Context, Tag, getSubprogram(), Entity,
4368 EXPECT_NE(N, DIImportedEntity::get(Context, Tag, Scope, getCompositeType(),
4370 EXPECT_NE(N, DIImportedEntity::get(Context, Tag, Scope, Entity, nullptr, Line,
4372 EXPECT_NE(N, DIImportedEntity::get(Context, Tag, Scope, Entity, File,
4374 EXPECT_NE(N, DIImportedEntity::get(Context, Tag, Scope, Entity, File, Line,
4382 auto *Ne = DIImportedEntity::get(Context, Tag, Scope, Entity, File, Line,
4387 EXPECT_EQ(Ne, DIImportedEntity::get(Context, Tag, Scope, Entity, File, Line,
4389 EXPECT_NE(Ne, DIImportedEntity::get(Context, Tag, Scope, Entity, File, Line,
4391 EXPECT_NE(Ne, DIImportedEntity::get(Context, Tag, Scope, Entity, File, Line,
4394 Ne, DIImportedEntity::get(Context, Tag, Scope, Entity, File, Line, Name));
4403 MDNode *N = MDNode::get(Context, {});
4404 auto *V = MetadataAsValue::get(Context, N);
4408 auto *V2 = MetadataAsValue::get(Context, N);
4413 MDNode *N = MDNode::get(Context, {});
4415 MDNode *N2 = MDNode::get(Context, Ops);
4416 auto *V = MetadataAsValue::get(Context, N2);
4420 auto *V2 = MetadataAsValue::get(Context, N2);
4423 auto *V3 = MetadataAsValue::get(Context, N);
4430 auto *C = ConstantInt::getTrue(Context);
4433 auto *N = MDNode::get(Context, Ops);
4435 auto *V = MetadataAsValue::get(Context, MD);
4439 auto *V2 = MetadataAsValue::get(Context, N);
4447 Type *Ty = PointerType::getUnqual(Context);
4466 auto *I32Poison = PoisonValue::get(Type::getInt32Ty(Context));
4467 auto *I64Poison = PoisonValue::get(Type::getInt64Ty(Context));
4482 ConstantAsMetadata::get(ConstantInt::get(Context, APInt(8, 0)));
4484 auto Temp1 = MDTuple::getTemporary(Context, {});
4485 auto Temp2 = MDTuple::getTemporary(Context, {CI});
4486 auto *N = MDTuple::get(Context, {Temp1.get()});
4499 ConstantAsMetadata::get(ConstantInt::get(Context, APInt(8, 0)));
4502 auto Temp = MDTuple::getTemporary(Context, {});
4508 auto *N1 = MDTuple::get(Context, Ops1);
4509 auto *N2 = MDTuple::get(Context, Ops2);
4529 ConstantAsMetadata::get(ConstantInt::get(Context, APInt(8, 0))));
4531 ConstantAsMetadata::get(ConstantInt::get(Context, APInt(2, 0))));
4532 DIArgList *DV0 = DIArgList::get(Context, VMs);
4533 DIArgList *DV1 = DIArgList::get(Context, VMs);
4538 Type *Ty = PointerType::getUnqual(Context);
4540 ConstantAsMetadata::get(ConstantInt::get(Context, APInt(8, 0)));
4548 auto *AL = DIArgList::get(Context, VMs);
4563 Type *Ty = PointerType::getUnqual(Context);
4580 Type *Ty = PointerType::getUnqual(Context);
4592 LLVMContext Context;
4594 ConstantAsMetadata::get(ConstantInt::get(Type::getInt32Ty(Context), 1));
4596 ConstantAsMetadata::get(ConstantInt::get(Type::getInt32Ty(Context), 2));
4600 MDNode *n = MDNode::get(Context, V);
4601 MDNode *n2 = MDNode::get(Context, V2);
4603 Module M("MyModule", Context);
4688 EXPECT_EQ(Context.getMDKindID("other1"), MDs[2].first);
4689 EXPECT_EQ(Context.getMDKindID("other2"), MDs[3].first);
4713 (void)new UnreachableInst(Context, BasicBlock::Create(Context, "bb", F));
4761 auto *D = MDTuple::getDistinct(Context, Ops);
4767 auto *N0 = MDTuple::get(Context, {});
4768 auto *N1 = MDTuple::get(Context, N0);
4779 DistinctMDOperandPlaceholder(7).replaceUseWith(MDTuple::get(Context, {}));
4791 EXPECT_DEATH(MetadataAsValue::get(Context, &PH),
4798 EXPECT_DEATH(MDTuple::get(Context, &PH), "Unexpected callback to owner");
4804 MDTuple::getDistinct(Context, &PH);
4805 EXPECT_DEATH(MDTuple::getDistinct(Context, &PH),
4818 MDTuple::getDistinct(Context, &PH);
4824 EXPECT_DEATH(MDTuple::getDistinct(Context, &PH),
4839 DILocation *InlinedLoc = DILocation::get(Context, 2, 7, Scope);
4842 DILocalVariable::get(Context, Scope, "A", File, 5, Type, 2, Flags, 8, nullptr);
4844 DILocalVariable::get(Context, Scope, "B", File, 7, Type, 3, Flags, 8, nullptr);
4872 MDTuple *A = MDTuple::getDistinct(Context, {Value1, Value1});
4932 MDTuple *B = MDTuple::getDistinct(Context, Ops);
4945 auto Temp1 = MDTuple::getTemporary(Context, {});
4964 MDTuple *C = MDTuple::getDistinct(Context, OpsLarge);
5002 MDTuple *A = MDTuple::get(Context, std::nullopt);
5010 auto B = MDTuple::getTemporary(Context, {Value2});