Lines Matching refs:Enc
7352 std::string Enc;
7354 FieldEncoding(bool b, SmallStringEnc &e) : HasName(b), Enc(e.c_str()) {}
7355 StringRef str() {return Enc.c_str();}
7358 return Enc < rhs.Enc;
7536 static bool getTypeString(SmallStringEnc &Enc, const Decl *D,
7542 SmallStringEnc Enc;
7543 if (getTypeString(Enc
7546 llvm::MDString::get(Ctx, Enc.str())};
7598 static bool appendType(SmallStringEnc &Enc, QualType QType,
7610 SmallStringEnc Enc;
7611 Enc += "m(";
7612 Enc += Field->getName();
7613 Enc += "){";
7615 Enc += "b(";
7616 llvm::raw_svector_ostream OS(Enc);
7618 Enc += ':';
7620 if (!appendType(Enc, Field->getType(), CGM, TSC))
7623 Enc += ')';
7624 Enc += '}';
7625 FE.emplace_back(!Field->getName().empty(), Enc);
7630 /// Appends structure and union types to Enc and adds encoding to cache.
7633 static bool appendRecordType(SmallStringEnc &Enc, const RecordType *RT,
7639 Enc += TypeString;
7644 size_t Start = Enc.size();
7645 Enc += (RT->isUnionType()? 'u' : 's');
7646 Enc += '(';
7648 Enc += ID->getName();
7649 Enc += "){";
7659 std::string StubEnc(Enc.substr(Start).str());
7675 Enc += ',';
7676 Enc += FE[I].str();
7679 Enc += '}';
7680 TSC.addIfComplete(ID, Enc.substr(Start), IsRecursive);
7684 /// Appends enum types to Enc and adds the encoding to the cache.
7685 static bool appendEnumType(SmallStringEnc &Enc, const EnumType *ET,
7691 Enc += TypeString;
7695 size_t Start = Enc.size();
7696 Enc += "e(";
7698 Enc += ID->getName();
7699 Enc += "){";
7718 Enc += ',';
7719 Enc += FE[I].str();
7722 Enc += '}';
7723 TSC.addIfComplete(ID, Enc.substr(Start), false);
7727 /// Appends type's qualifier to Enc.
7729 static void appendQualifier(SmallStringEnc &Enc, QualType QT) {
7739 Enc += Table[Lookup];
7742 /// Appends built-in types to Enc.
7743 static bool appendBuiltinType(SmallStringEnc &Enc, const BuiltinType *BT) {
7797 Enc += EncType;
7801 /// Appends a pointer encoding to Enc before calling appendType for the pointee.
7802 static bool appendPointerType(SmallStringEnc &Enc, const PointerType *PT,
7805 Enc += "p(";
7806 if (!appendType(Enc, PT->getPointeeType(), CGM, TSC))
7808 Enc += ')';
7812 /// Appends array encoding to Enc before calling appendType for the element.
7813 static bool appendArrayType(SmallStringEnc &Enc, QualType QT,
7819 Enc += "a(";
7821 CAT->getSize().toStringUnsigned(Enc);
7823 Enc += NoSizeEnc; // Global arrays use "*", otherwise it is "".
7824 Enc += ':';
7826 appendQualifier(Enc, QT);
7827 if (!appendType(Enc, AT->getElementType(), CGM, TSC))
7829 Enc += ')';
7833 /// Appends a function encoding to Enc, calling appendType for the return type
7835 static bool appendFunctionType(SmallStringEnc &Enc, const FunctionType *FT,
7838 Enc += "f{";
7839 if (!appendType(Enc, FT->getReturnType(), CGM, TSC))
7841 Enc += "}(";
7848 if (!appendType(Enc, *I, CGM, TSC))
7852 Enc += ',';
7855 Enc += ",va";
7858 Enc += "va";
7860 Enc += '0';
7863 Enc += ')';
7869 static bool appendType(SmallStringEnc &Enc, QualType QType,
7878 return appendArrayType(Enc, QT, AT, CGM, TSC, "");
7880 appendQualifier(Enc, QT);
7883 return appendBuiltinType(Enc, BT);
7886 return appendPointerType(Enc, PT, CGM, TSC);
7889 return appendEnumType(Enc, ET, TSC, QT.getBaseTypeIdentifier());
7892 return appendRecordType(Enc, RT, CGM, TSC, QT.getBaseTypeIdentifier());
7895 return appendRecordType(Enc, RT, CGM, TSC, QT.getBaseTypeIdentifier());
7898 return appendFunctionType(Enc, FT, CGM, TSC);
7903 static bool getTypeString(SmallStringEnc &Enc, const Decl *D,
7911 return appendType(Enc, FD->getType(), CGM, TSC);
7922 return appendArrayType(Enc, QT, AT, CGM, TSC, "*");
7924 return appendType(Enc, QT, CGM, TSC);