[lld] r362572 - [LLD][COFF] Don't take into account the 'age' when looking for PDB type server

Alexandre Ganea via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 4 19:01:43 PDT 2019


Author: aganea
Date: Tue Jun  4 19:01:43 2019
New Revision: 362572

URL: http://llvm.org/viewvc/llvm-project?rev=362572&view=rev
Log:
[LLD][COFF] Don't take into account the 'age' when looking for PDB type server

The age field is only there to say how many times an OBJ or a PDB was incrementally linked. It shouldn't be used to validate the link between the OBJ and the PDB.

Differential Revision: https://reviews.llvm.org/D62837

Modified:
    lld/trunk/COFF/DebugTypes.cpp
    lld/trunk/test/COFF/Inputs/pdb-type-server-valid-signature.yaml

Modified: lld/trunk/COFF/DebugTypes.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/DebugTypes.cpp?rev=362572&r1=362571&r2=362572&view=diff
==============================================================================
--- lld/trunk/COFF/DebugTypes.cpp (original)
+++ lld/trunk/COFF/DebugTypes.cpp Tue Jun  4 19:01:43 2019
@@ -198,9 +198,9 @@ TypeServerSource::findFromFile(const Obj
   pdb::InfoStream &Info = cantFail(PDBFile.getPDBInfoStream());
 
   // Just because a file with a matching name was found doesn't mean it can be
-  // used. The GUID and Age must match between the PDB header and the OBJ
+  // used. The GUID must match between the PDB header and the OBJ
   // TypeServer2 record. The 'Age' is used by MSVC incremental compilation.
-  if (Info.getGuid() != TS.getGuid() || Info.getAge() != TS.getAge())
+  if (Info.getGuid() != TS.getGuid())
     return createFileError(
         TS.Name,
         make_error<pdb::PDBError>(pdb::pdb_error_code::signature_out_of_date));

Modified: lld/trunk/test/COFF/Inputs/pdb-type-server-valid-signature.yaml
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/COFF/Inputs/pdb-type-server-valid-signature.yaml?rev=362572&r1=362571&r2=362572&view=diff
==============================================================================
--- lld/trunk/test/COFF/Inputs/pdb-type-server-valid-signature.yaml (original)
+++ lld/trunk/test/COFF/Inputs/pdb-type-server-valid-signature.yaml Tue Jun  4 19:01:43 2019
@@ -69,7 +69,7 @@ sections:
       - Kind:            LF_TYPESERVER2
         TypeServer2:
           Guid:            '{8DABD2A0-28FF-CB43-9BAF-175B77B76414}'
-          Age:             1
+          Age:             18
           Name:            'pdb-diff-cl.pdb'
   - Name:            '.text$mn'
     Characteristics: [ IMAGE_SCN_CNT_CODE, IMAGE_SCN_MEM_EXECUTE, IMAGE_SCN_MEM_READ ]




More information about the llvm-commits mailing list