Bug 1501129 - Use field names instead of their index when mangling. r=mccr8

Differential Revision: https://phabricator.services.mozilla.com/D9558

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Kartikaya Gupta 2018-10-23 17:58:11 +00:00
parent 894f89ae56
commit 2e8b3b16f3

View File

@ -398,7 +398,7 @@ private:
} else if (const FieldDecl *D2 = dyn_cast<FieldDecl>(Decl)) {
const RecordDecl *Record = D2->getParent();
return std::string("F_<") + getMangledName(Ctx, Record) + ">_" +
toString(D2->getFieldIndex());
D2->getNameAsString();
} else if (const EnumConstantDecl *D2 = dyn_cast<EnumConstantDecl>(Decl)) {
const DeclContext *DC = Decl->getDeclContext();
if (const NamedDecl *Named = dyn_cast<NamedDecl>(DC)) {