Lines Matching defs:TI

50 static TypeIndex getTrueType(TypeIndex &TI) {
71 { dbgs() << "Index before: " << HexNumber(TI.getIndex()) << "\n"; });
72 TI.setIndex(TI.getIndex() & 0x0000ffff);
74 { dbgs() << "Index after: " << HexNumber(TI.getIndex()) << "\n"; });
75 return TI;
85 static StringRef getRecordName(LazyRandomTypeCollection &Types, TypeIndex TI) {
86 if (TI.isSimple())
90 CVType CVReference = Types.getType(TI);
140 void add(uint32_t StreamIdx, TypeIndex TI, TypeLeafKind Kind,
142 void add(uint32_t StreamIdx, TypeIndex TI, StringRef Name);
143 LVElement *find(uint32_t StreamIdx, TypeIndex TI, bool Create = true);
191 void record(bool IsForwardRef, StringRef Name, TypeIndex TI) {
195 (IsForwardRef) ? add(Name, TI) : update(Name, TI);
210 // If the given TI corresponds to a reference, return the reference.
211 // Otherwise return the given TI.
212 TypeIndex remap(TypeIndex TI) {
213 TypeIndex Forward = find(TI);
214 return Forward.isNoneType() ? TI : Forward;
281 void add(TypeIndex TI, StringRef String) {
283 if (Strings.find(TI) == Strings.end())
285 std::piecewise_construct, std::forward_as_tuple(TI),
289 StringRef find(TypeIndex TI) {
290 StringIds::iterator Iter = Strings.find(TI);
294 uint32_t findIndex(TypeIndex TI) {
295 StringIds::iterator Iter = Strings.find(TI);
336 void LVTypeRecords::add(uint32_t StreamIdx, TypeIndex TI, TypeLeafKind Kind,
340 Target.emplace(std::piecewise_construct, std::forward_as_tuple(TI),
344 void LVTypeRecords::add(uint32_t StreamIdx, TypeIndex TI, StringRef Name) {
346 Target.emplace(Name, TI);
349 LVElement *LVTypeRecords::find(uint32_t StreamIdx, TypeIndex TI, bool Create) {
354 RecordTable::iterator Iter = Target.find(TI);
363 Element->setOffset(TI.getIndex());
365 Target[TI].second = Element;
485 void LVTypeVisitor::printTypeIndex(StringRef FieldName, TypeIndex TI,
487 codeview::printTypeIndex(W, FieldName, TI,
495 Error LVTypeVisitor::visitTypeBegin(CVType &Record, TypeIndex TI) {
498 W.getOStream() << " (" << HexNumber(TI.getIndex()) << ")\n";
506 CurrentTypeIndex = TI;
507 Shared->TypeRecords.add(StreamIdx, TI, Record.kind());
551 TypeIndex TI;
555 TI = Args.getArgs()[BuildInfoRecord::BuildInfoArg::CurrentDirectory];
556 String = Ids.getTypeName(TI);
558 Shared->StringRecords.add(TI, String);
561 TI = Args.getArgs()[BuildInfoRecord::BuildInfoArg::SourceFile];
562 String = Ids.getTypeName(TI);
564 Shared->StringRecords.add(TI, String);
727 void LVSymbolVisitor::printTypeIndex(StringRef FieldName, TypeIndex TI) const {
728 codeview::printTypeIndex(W, FieldName, TI, Types);
1570 TypeIndex TI = Shared->ForwardReferences.find(OuterComponent);
1578 if (TI.isNoneType())
1744 void LVLogicalVisitor::printTypeIndex(StringRef FieldName, TypeIndex TI,
1746 codeview::printTypeIndex(W, FieldName, TI,
1750 void LVLogicalVisitor::printTypeBegin(CVType &Record, TypeIndex TI,
1754 W.getOStream() << " (" << HexNumber(TI.getIndex()) << ")";
1758 printTypeIndex("TI", TI, StreamIdx);
1768 void LVLogicalVisitor::printMemberBegin(CVMemberRecord &Record, TypeIndex TI,
1773 W.getOStream() << " (" << HexNumber(TI.getIndex()) << ")";
1777 printTypeIndex("TI", TI, StreamIdx);
1787 Error LVLogicalVisitor::visitUnknownType(CVType &Record, TypeIndex TI) {
1789 printTypeIndex("\nTI", TI, StreamTPI);
1797 TypeIndex TI, LVElement *Element) {
1801 printTypeBegin(Record, TI, Element, StreamTPI);
1820 TypeIndex TI, LVElement *Element) {
1822 printTypeBegin(Record, TI, Element, StreamTPI);
1938 TypeIndex TI, LVElement *Element) {
1940 printTypeBegin(Record, TI, Element, StreamTPI);
1941 printTypeIndex("Type", TI, StreamTPI);
1954 TypeIndex TI, LVElement *Element) {
1956 printTypeBegin(Record, TI, Element, StreamIPI);
1978 TypeIndex TI, LVElement *Element) {
1980 printTypeBegin(Record, TI, Element, StreamTPI);
2037 // Pass down the TypeIndex 'TI' for the aggregate containing the field list.
2039 if (Error Err = finishVisitation(CVFieldList, TI, Scope))
2048 TypeIndex TI, LVElement *Element) {
2050 printTypeBegin(Record, TI, Element, StreamTPI);
2106 TypeIndex TI, LVElement *Element) {
2108 printTypeBegin(Record, TI, Element, StreamTPI);
2112 if (Error Err = visitFieldListMemberStream(TI, Element, FieldList.Data))
2120 TypeIndex TI, LVElement *Element) {
2123 printTypeBegin(Record, TI, Element, StreamIPI);
2165 TypeIndex TI, LVElement *Element) {
2167 printTypeBegin(Record, TI, Element, StreamTPI);
2175 TypeIndex TI, LVElement *Element) {
2178 printTypeBegin(Record, TI, Element, StreamIPI);
2206 MemberFunctionRecord &MF, TypeIndex TI,
2209 printTypeBegin(Record, TI, Element, StreamTPI);
2224 MemberFunction->setOffset(TI.getIndex());
2254 TypeIndex TI, LVElement *Element) {
2256 printTypeBegin(Record, TI, Element, StreamTPI);
2264 if (Error Err = visitKnownMember(Record, Method, TI, Element))
2273 TypeIndex TI, LVElement *Element) {
2275 printTypeBegin(Record, TI, Element, StreamTPI);
2334 TypeIndex TI, LVElement *Element) {
2336 printTypeBegin(Record, TI, Element, StreamTPI);
2417 TypeIndex TI, LVElement *Element) {
2419 printTypeBegin(Record, TI, Element, StreamTPI);
2448 TypeIndex TI, LVElement *Element) {
2450 printTypeBegin(Record, TI, Element, StreamTPI);
2484 // Pass down the TypeIndex 'TI' for the aggregate containing the field list.
2486 if (Error Err = finishVisitation(CVFieldList, TI, Scope))
2495 TypeIndex TI, LVElement *Element) {
2497 printTypeBegin(Record, TI, Element, StreamTPI);
2508 TypeIndex TI, LVElement *Element) {
2510 printTypeBegin(Record, TI, Element, StreamTPI);
2525 TypeIndex TI, LVElement *Element) {
2527 printTypeBegin(Record, TI, Element, StreamTPI);
2537 TypeIndex TI, LVElement *Element) {
2540 printTypeBegin(Record, TI, Element, StreamIPI);
2554 TypeIndex TI, LVElement *Element) {
2557 printTypeIndex("\nTI", TI, StreamIPI);
2577 TypeIndex TI, LVElement *Element) {
2580 printTypeIndex("\nTI", TI, StreamIPI);
2591 TypeIndex TI, LVElement *Element) {
2594 printTypeBegin(Record, TI, Element, StreamIPI);
2595 printTypeIndex("\nTI", TI, StreamIPI);
2607 TypeIndex TI, LVElement *Element) {
2609 printTypeBegin(Record, TI, Element, StreamTPI);
2622 TypeIndex TI, LVElement *Element) {
2624 printTypeBegin(Record, TI, Element, StreamTPI);
2632 TypeIndex TI) {
2639 BaseClassRecord &Base, TypeIndex TI,
2642 printMemberBegin(Record, TI, Element, StreamTPI);
2662 DataMemberRecord &Field, TypeIndex TI,
2665 printMemberBegin(Record, TI, Element, StreamTPI);
2680 EnumeratorRecord &Enum, TypeIndex TI,
2683 printMemberBegin(Record, TI, Element, StreamTPI);
2704 TypeIndex TI, LVElement *Element) {
2706 printMemberBegin(Record, TI, Element, StreamTPI);
2715 NestedTypeRecord &Nested, TypeIndex TI,
2718 printMemberBegin(Record, TI, Element, StreamTPI);
2734 StringRef RecordName = getRecordName(types(), TI);
2760 OneMethodRecord &Method, TypeIndex TI,
2763 printMemberBegin(Record, TI, Element, StreamTPI);
2807 TypeIndex TI, LVElement *Element) {
2809 printMemberBegin(Record, TI, Element, StreamTPI);
2830 TypeIndex TI, LVElement *Element) {
2832 printMemberBegin(Record, TI, Element, StreamTPI);
2846 VFPtrRecord &VFTable, TypeIndex TI,
2849 printMemberBegin(Record, TI, Element, StreamTPI);
2859 TypeIndex TI, LVElement *Element) {
2861 printMemberBegin(Record, TI, Element, StreamTPI);
2884 TypeIndex TI, LVElement *Element) {
2896 visitKnownMember<Name##Record>(Record, Callbacks, TI, Element)) \
2913 Error LVLogicalVisitor::finishVisitation(CVType &Record, TypeIndex TI,
2917 if (Error Err = visitUnknownType(Record, TI))
2922 if (Error Err = visitKnownRecord<Name##Record>(Record, TI, Element)) \
2938 TypeIndex TI, LVElement *Element, ArrayRef<uint8_t> FieldList) {
2952 if (Error Err = visitMemberRecord(Record, Pipeline, TI, Element))
3134 LVElement *LVLogicalVisitor::createElement(TypeIndex TI, TypeLeafKind Kind) {
3135 LVElement *Element = Shared->TypeRecords.find(StreamTPI, TI);
3147 if (TI.getIndex() < TypeIndex::FirstNonSimpleIndex) {
3149 Shared->TypeRecords.add(StreamTPI, TI, Kind, Element);
3150 Element->setOffset(TI.getIndex());
3156 printTypeIndex("TypeIndex", TI, StreamTPI);
3161 Element->setOffset(TI.getIndex());
3167 StringRef Name, TypeIndex TI,
3170 printTypeIndex("TypeIndex", TI, StreamTPI);
3177 if (TI.isNoneType() || TI.isSimple())
3178 Symbol->setType(getElement(StreamTPI, TI));
3181 CVType CVMemberType = Types.getType(TI);
3183 if (Error Err = finishVisitation(CVMemberType, TI, Symbol)) {
3188 Symbol->setType(getElement(StreamTPI, TI));
3206 LVSymbol *LVLogicalVisitor::createParameter(TypeIndex TI, StringRef Name,
3208 return createParameter(getElement(StreamTPI, TI), Name, Parent);
3211 LVType *LVLogicalVisitor::createBaseType(TypeIndex TI, StringRef TypeName) {
3212 TypeLeafKind SimpleKind = (TypeLeafKind)TI.getSimpleKind();
3229 LVType *LVLogicalVisitor::createPointerType(TypeIndex TI, StringRef TypeName) {
3231 printTypeIndex("TypeIndex", TI, StreamTPI);
3235 if (LVElement *Element = Shared->TypeRecords.find(StreamTPI, TI))
3238 LVType *Pointee = createBaseType(TI, TypeName.drop_back(1));
3239 if (createElement(TI, TypeLeafKind::LF_POINTER)) {
3319 LVElement *LVLogicalVisitor::getElement(uint32_t StreamIdx, TypeIndex TI,
3321 LLVM_DEBUG({ printTypeIndex("TypeIndex", TI, StreamTPI); });
3322 TI = Shared->ForwardReferences.remap(TI);
3323 LLVM_DEBUG({ printTypeIndex("TypeIndex Remap", TI, StreamTPI); });
3325 LVElement *Element = Shared->TypeRecords.find(StreamIdx, TI);
3327 if (TI.isNoneType() || TI.isSimple()) {
3328 StringRef TypeName = TypeIndex::simpleTypeName(TI);
3333 return (TypeName.back() == '*') ? createPointerType(TI, TypeName)
3334 : createBaseType(TI, TypeName);
3337 LLVM_DEBUG({ W.printHex("TypeIndex not implemented: ", TI.getIndex()); });
3351 CVType CVRecord = Types.getType(TI);
3352 if (Error Err = finishVisitation(CVRecord, TI, Element)) {