Lines Matching refs:Enc
6919 std::string Enc;
6921 FieldEncoding(bool b, SmallStringEnc &e) : HasName(b), Enc(e.c_str()) {}
6922 StringRef str() {return Enc.c_str();}
6925 return Enc < rhs.Enc;
7100 static bool getTypeString(SmallStringEnc &Enc, const Decl *D,
7106 SmallStringEnc Enc;
7107 if (getTypeString(Enc, D, CGM, TSC)) {
7111 Enc.str()));
7118 static bool appendType(SmallStringEnc &Enc, QualType QType,
7130 SmallStringEnc Enc;
7131 Enc += "m(";
7132 Enc += Field->getName();
7133 Enc += "){";
7135 Enc += "b(";
7136 llvm::raw_svector_ostream OS(Enc);
7138 Enc += ':';
7140 if (!appendType(Enc, Field->getType(), CGM, TSC))
7143 Enc += ')';
7144 Enc += '}';
7145 FE.emplace_back(!Field->getName().empty(), Enc);
7150 /// Appends structure and union types to Enc and adds encoding to cache.
7153 static bool appendRecordType(SmallStringEnc &Enc, const RecordType *RT,
7159 Enc += TypeString;
7164 size_t Start = Enc.size();
7165 Enc += (RT->isUnionType()? 'u' : 's');
7166 Enc += '(';
7168 Enc += ID->getName();
7169 Enc += "){";
7179 std::string StubEnc(Enc.substr(Start).str());
7195 Enc += ',';
7196 Enc += FE[I].str();
7199 Enc += '}';
7200 TSC.addIfComplete(ID, Enc.substr(Start), IsRecursive);
7204 /// Appends enum types to Enc and adds the encoding to the cache.
7205 static bool appendEnumType(SmallStringEnc &Enc, const EnumType *ET,
7211 Enc += TypeString;
7215 size_t Start = Enc.size();
7216 Enc += "e(";
7218 Enc += ID->getName();
7219 Enc += "){";
7238 Enc += ',';
7239 Enc += FE[I].str();
7242 Enc += '}';
7243 TSC.addIfComplete(ID, Enc.substr(Start), false);
7247 /// Appends type's qualifier to Enc.
7249 static void appendQualifier(SmallStringEnc &Enc, QualType QT) {
7259 Enc += Table[Lookup];
7262 /// Appends built-in types to Enc.
7263 static bool appendBuiltinType(SmallStringEnc &Enc, const BuiltinType *BT) {
7317 Enc += EncType;
7321 /// Appends a pointer encoding to Enc before calling appendType for the pointee.
7322 static bool appendPointerType(SmallStringEnc &Enc, const PointerType *PT,
7325 Enc += "p(";
7326 if (!appendType(Enc, PT->getPointeeType(), CGM, TSC))
7328 Enc += ')';
7332 /// Appends array encoding to Enc before calling appendType for the element.
7333 static bool appendArrayType(SmallStringEnc &Enc, QualType QT,
7339 Enc += "a(";
7341 CAT->getSize().toStringUnsigned(Enc);
7343 Enc += NoSizeEnc; // Global arrays use "*", otherwise it is "".
7344 Enc += ':';
7346 appendQualifier(Enc, QT);
7347 if (!appendType(Enc, AT->getElementType(), CGM, TSC))
7349 Enc += ')';
7353 /// Appends a function encoding to Enc, calling appendType for the return type
7355 static bool appendFunctionType(SmallStringEnc &Enc, const FunctionType *FT,
7358 Enc += "f{";
7359 if (!appendType(Enc, FT->getReturnType(), CGM, TSC))
7361 Enc += "}(";
7368 if (!appendType(Enc, *I, CGM, TSC))
7372 Enc += ',';
7375 Enc += ",va";
7378 Enc += "va";
7380 Enc += '0';
7383 Enc += ')';
7389 static bool appendType(SmallStringEnc &Enc, QualType QType,
7398 return appendArrayType(Enc, QT, AT, CGM, TSC, "");
7400 appendQualifier(Enc, QT);
7403 return appendBuiltinType(Enc, BT);
7406 return appendPointerType(Enc, PT, CGM, TSC);
7409 return appendEnumType(Enc, ET, TSC, QT.getBaseTypeIdentifier());
7412 return appendRecordType(Enc, RT, CGM, TSC, QT.getBaseTypeIdentifier());
7415 return appendRecordType(Enc, RT, CGM, TSC, QT.getBaseTypeIdentifier());
7418 return appendFunctionType(Enc, FT, CGM, TSC);
7423 static bool getTypeString(SmallStringEnc &Enc, const Decl *D,
7431 return appendType(Enc, FD->getType(), CGM, TSC);
7442 return appendArrayType(Enc, QT, AT, CGM, TSC, "*");
7444 return appendType(Enc, QT, CGM, TSC);