Lines Matching defs:TI

45 static TypeIndex getTrueType(TypeIndex &TI) {
66 { dbgs() << "Index before: " << HexNumber(TI.getIndex()) << "\n"; });
67 TI.setIndex(TI.getIndex() & 0x0000ffff);
69 { dbgs() << "Index after: " << HexNumber(TI.getIndex()) << "\n"; });
70 return TI;
80 static StringRef getRecordName(LazyRandomTypeCollection &Types, TypeIndex TI) {
81 if (TI.isSimple())
85 CVType CVReference = Types.getType(TI);
135 void add(uint32_t StreamIdx, TypeIndex TI, TypeLeafKind Kind,
137 void add(uint32_t StreamIdx, TypeIndex TI, StringRef Name);
138 LVElement *find(uint32_t StreamIdx, TypeIndex TI, bool Create = true);
187 void record(bool IsForwardRef, StringRef Name, TypeIndex TI) {
191 (IsForwardRef) ? add(Name, TI) : update(Name, TI);
205 // If the given TI corresponds to a reference, return the reference.
206 // Otherwise return the given TI.
207 TypeIndex remap(TypeIndex TI) {
208 TypeIndex Forward = find(TI);
209 return Forward.isNoneType() ? TI : Forward;
275 void add(TypeIndex TI, StringRef String) {
277 if (Strings.find(TI) == Strings.end())
279 std::piecewise_construct, std::forward_as_tuple(TI),
283 StringRef find(TypeIndex TI) {
284 StringIds::iterator Iter = Strings.find(TI);
288 uint32_t findIndex(TypeIndex TI) {
289 StringIds::iterator Iter = Strings.find(TI);
330 void LVTypeRecords::add(uint32_t StreamIdx, TypeIndex TI, TypeLeafKind Kind,
334 Target.emplace(std::piecewise_construct, std::forward_as_tuple(TI),
338 void LVTypeRecords::add(uint32_t StreamIdx, TypeIndex TI, StringRef Name) {
340 Target.emplace(Name, TI);
343 LVElement *LVTypeRecords::find(uint32_t StreamIdx, TypeIndex TI, bool Create) {
348 RecordTable::iterator Iter = Target.find(TI);
357 Element->setOffset(TI.getIndex());
359 Target[TI].second = Element;
479 void LVTypeVisitor::printTypeIndex(StringRef FieldName, TypeIndex TI,
481 codeview::printTypeIndex(W, FieldName, TI,
489 Error LVTypeVisitor::visitTypeBegin(CVType &Record, TypeIndex TI) {
492 W.getOStream() << " (" << HexNumber(TI.getIndex()) << ")\n";
500 CurrentTypeIndex = TI;
501 Shared->TypeRecords.add(StreamIdx, TI, Record.kind());
545 TypeIndex TI;
549 TI = Args.getArgs()[BuildInfoRecord::BuildInfoArg::CurrentDirectory];
550 String = Ids.getTypeName(TI);
552 Shared->StringRecords.add(TI, String);
555 TI = Args.getArgs()[BuildInfoRecord::BuildInfoArg::SourceFile];
556 String = Ids.getTypeName(TI);
558 Shared->StringRecords.add(TI, String);
721 void LVSymbolVisitor::printTypeIndex(StringRef FieldName, TypeIndex TI) const {
722 codeview::printTypeIndex(W, FieldName, TI, Types);
1564 TypeIndex TI = Shared->ForwardReferences.find(OuterComponent);
1572 if (TI.isNoneType())
1738 void LVLogicalVisitor::printTypeIndex(StringRef FieldName, TypeIndex TI,
1740 codeview::printTypeIndex(W, FieldName, TI,
1744 void LVLogicalVisitor::printTypeBegin(CVType &Record, TypeIndex TI,
1748 W.getOStream() << " (" << HexNumber(TI.getIndex()) << ")";
1752 printTypeIndex("TI", TI, StreamIdx);
1762 void LVLogicalVisitor::printMemberBegin(CVMemberRecord &Record, TypeIndex TI,
1767 W.getOStream() << " (" << HexNumber(TI.getIndex()) << ")";
1771 printTypeIndex("TI", TI, StreamIdx);
1781 Error LVLogicalVisitor::visitUnknownType(CVType &Record, TypeIndex TI) {
1783 printTypeIndex("\nTI", TI, StreamTPI);
1791 TypeIndex TI, LVElement *Element) {
1795 printTypeBegin(Record, TI, Element, StreamTPI);
1814 TypeIndex TI, LVElement *Element) {
1816 printTypeBegin(Record, TI, Element, StreamTPI);
1932 TypeIndex TI, LVElement *Element) {
1934 printTypeBegin(Record, TI, Element, StreamTPI);
1935 printTypeIndex("Type", TI, StreamTPI);
1948 TypeIndex TI, LVElement *Element) {
1950 printTypeBegin(Record, TI, Element, StreamIPI);
1972 TypeIndex TI, LVElement *Element) {
1974 printTypeBegin(Record, TI, Element, StreamTPI);
2031 // Pass down the TypeIndex 'TI' for the aggregate containing the field list.
2033 if (Error Err = finishVisitation(CVFieldList, TI, Scope))
2042 TypeIndex TI, LVElement *Element) {
2044 printTypeBegin(Record, TI, Element, StreamTPI);
2100 TypeIndex TI, LVElement *Element) {
2102 printTypeBegin(Record, TI, Element, StreamTPI);
2106 if (Error Err = visitFieldListMemberStream(TI, Element, FieldList.Data))
2114 TypeIndex TI, LVElement *Element) {
2117 printTypeBegin(Record, TI, Element, StreamIPI);
2159 TypeIndex TI, LVElement *Element) {
2161 printTypeBegin(Record, TI, Element, StreamTPI);
2169 TypeIndex TI, LVElement *Element) {
2172 printTypeBegin(Record, TI, Element, StreamIPI);
2200 MemberFunctionRecord &MF, TypeIndex TI,
2203 printTypeBegin(Record, TI, Element, StreamTPI);
2218 MemberFunction->setOffset(TI.getIndex());
2248 TypeIndex TI, LVElement *Element) {
2250 printTypeBegin(Record, TI, Element, StreamTPI);
2258 if (Error Err = visitKnownMember(Record, Method, TI, Element))
2267 TypeIndex TI, LVElement *Element) {
2269 printTypeBegin(Record, TI, Element, StreamTPI);
2328 TypeIndex TI, LVElement *Element) {
2330 printTypeBegin(Record, TI, Element, StreamTPI);
2411 TypeIndex TI, LVElement *Element) {
2413 printTypeBegin(Record, TI, Element, StreamTPI);
2442 TypeIndex TI, LVElement *Element) {
2444 printTypeBegin(Record, TI, Element, StreamTPI);
2478 // Pass down the TypeIndex 'TI' for the aggregate containing the field list.
2480 if (Error Err = finishVisitation(CVFieldList, TI, Scope))
2489 TypeIndex TI, LVElement *Element) {
2491 printTypeBegin(Record, TI, Element, StreamTPI);
2502 TypeIndex TI, LVElement *Element) {
2504 printTypeBegin(Record, TI, Element, StreamTPI);
2519 TypeIndex TI, LVElement *Element) {
2521 printTypeBegin(Record, TI, Element, StreamTPI);
2531 TypeIndex TI, LVElement *Element) {
2534 printTypeBegin(Record, TI, Element, StreamIPI);
2548 TypeIndex TI, LVElement *Element) {
2551 printTypeIndex("\nTI", TI, StreamIPI);
2571 TypeIndex TI, LVElement *Element) {
2574 printTypeIndex("\nTI", TI, StreamIPI);
2585 TypeIndex TI, LVElement *Element) {
2588 printTypeBegin(Record, TI, Element, StreamIPI);
2589 printTypeIndex("\nTI", TI, StreamIPI);
2601 TypeIndex TI, LVElement *Element) {
2603 printTypeBegin(Record, TI, Element, StreamTPI);
2616 TypeIndex TI, LVElement *Element) {
2618 printTypeBegin(Record, TI, Element, StreamTPI);
2626 TypeIndex TI) {
2633 BaseClassRecord &Base, TypeIndex TI,
2636 printMemberBegin(Record, TI, Element, StreamTPI);
2656 DataMemberRecord &Field, TypeIndex TI,
2659 printMemberBegin(Record, TI, Element, StreamTPI);
2674 EnumeratorRecord &Enum, TypeIndex TI,
2677 printMemberBegin(Record, TI, Element, StreamTPI);
2698 TypeIndex TI, LVElement *Element) {
2700 printMemberBegin(Record, TI, Element, StreamTPI);
2709 NestedTypeRecord &Nested, TypeIndex TI,
2712 printMemberBegin(Record, TI, Element, StreamTPI);
2728 StringRef RecordName = getRecordName(types(), TI);
2754 OneMethodRecord &Method, TypeIndex TI,
2757 printMemberBegin(Record, TI, Element, StreamTPI);
2801 TypeIndex TI, LVElement *Element) {
2803 printMemberBegin(Record, TI, Element, StreamTPI);
2824 TypeIndex TI, LVElement *Element) {
2826 printMemberBegin(Record, TI, Element, StreamTPI);
2840 VFPtrRecord &VFTable, TypeIndex TI,
2843 printMemberBegin(Record, TI, Element, StreamTPI);
2853 TypeIndex TI, LVElement *Element) {
2855 printMemberBegin(Record, TI, Element, StreamTPI);
2878 TypeIndex TI, LVElement *Element) {
2890 visitKnownMember<Name##Record>(Record, Callbacks, TI, Element)) \
2907 Error LVLogicalVisitor::finishVisitation(CVType &Record, TypeIndex TI,
2911 if (Error Err = visitUnknownType(Record, TI))
2916 if (Error Err = visitKnownRecord<Name##Record>(Record, TI, Element)) \
2932 TypeIndex TI, LVElement *Element, ArrayRef<uint8_t> FieldList) {
2946 if (Error Err = visitMemberRecord(Record, Pipeline, TI, Element))
3128 LVElement *LVLogicalVisitor::createElement(TypeIndex TI, TypeLeafKind Kind) {
3129 LVElement *Element = Shared->TypeRecords.find(StreamTPI, TI);
3141 if (TI.getIndex() < TypeIndex::FirstNonSimpleIndex) {
3143 Shared->TypeRecords.add(StreamTPI, TI, Kind, Element);
3144 Element->setOffset(TI.getIndex());
3150 printTypeIndex("TypeIndex", TI, StreamTPI);
3155 Element->setOffset(TI.getIndex());
3161 StringRef Name, TypeIndex TI,
3164 printTypeIndex("TypeIndex", TI, StreamTPI);
3171 if (TI.isNoneType() || TI.isSimple())
3172 Symbol->setType(getElement(StreamTPI, TI));
3175 CVType CVMemberType = Types.getType(TI);
3177 if (Error Err = finishVisitation(CVMemberType, TI, Symbol)) {
3182 Symbol->setType(getElement(StreamTPI, TI));
3200 LVSymbol *LVLogicalVisitor::createParameter(TypeIndex TI, StringRef Name,
3202 return createParameter(getElement(StreamTPI, TI), Name, Parent);
3205 LVType *LVLogicalVisitor::createBaseType(TypeIndex TI, StringRef TypeName) {
3206 TypeLeafKind SimpleKind = (TypeLeafKind)TI.getSimpleKind();
3223 LVType *LVLogicalVisitor::createPointerType(TypeIndex TI, StringRef TypeName) {
3225 printTypeIndex("TypeIndex", TI, StreamTPI);
3229 if (LVElement *Element = Shared->TypeRecords.find(StreamTPI, TI))
3232 LVType *Pointee = createBaseType(TI, TypeName.drop_back(1));
3233 if (createElement(TI, TypeLeafKind::LF_POINTER)) {
3313 LVElement *LVLogicalVisitor::getElement(uint32_t StreamIdx, TypeIndex TI,
3315 LLVM_DEBUG({ printTypeIndex("TypeIndex", TI, StreamTPI); });
3316 TI = Shared->ForwardReferences.remap(TI);
3317 LLVM_DEBUG({ printTypeIndex("TypeIndex Remap", TI, StreamTPI); });
3319 LVElement *Element = Shared->TypeRecords.find(StreamIdx, TI);
3321 if (TI.isNoneType() || TI.isSimple()) {
3322 StringRef TypeName = TypeIndex::simpleTypeName(TI);
3327 return (TypeName.back() == '*') ? createPointerType(TI, TypeName)
3328 : createBaseType(TI, TypeName);
3331 LLVM_DEBUG({ W.printHex("TypeIndex not implemented: ", TI.getIndex()); });
3345 CVType CVRecord = Types.getType(TI);
3346 if (Error Err = finishVisitation(CVRecord, TI, Element)) {