[PATCH] D35504: [PDB] Merge in types and items from type servers (/Zi)
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 17 15:10:00 PDT 2017
ruiu added inline comments.
================
Comment at: lld/COFF/PDB.cpp:125
+ /// Type index mappings of type server PDBs that we've loaded so far.
+ std::map<WindowsGuid, CVIndexMap> TypeServerIndexMappings;
};
----------------
Do you need an ordered map?
================
Comment at: lld/COFF/PDB.cpp:176
+ for (const CVType &Type : Types) {
+ if (Type.kind() == LF_TYPESERVER2) {
+ TypeServer2Record TS;
----------------
Reverse the condition for early break.
================
Comment at: lld/COFF/PDB.cpp:223-226
+ auto ExpectedInfo = File.getPDBInfoStream();
+ // All PDB Files should have an Info stream.
+ if (!ExpectedInfo)
+ return ExpectedInfo.takeError();
----------------
Is this correct that you are calling `getPDBInfoStream` only to check the existence of an Info stream?
================
Comment at: lld/COFF/PDB.cpp:230-238
+ bool CheckGuids = false;
+ if (CheckGuids) {
+ // Just because a file with a matching name was found and it was an actual
+ // PDB file doesn't mean it matches. For it to match the InfoStream's GUID
+ // must match the GUID specified in the TypeServer2 record.
+ if (ExpectedInfo->getGuid() != GuidFromObj)
+ return make_error<pdb::GenericError>(
----------------
Can you remove this code for now?
https://reviews.llvm.org/D35504
More information about the llvm-commits
mailing list