[lld] r308212 - [codeview] Remove TypeServerHandler and PDBTypeServerHandler

Reid Kleckner via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 17 13:28:06 PDT 2017


Author: rnk
Date: Mon Jul 17 13:28:06 2017
New Revision: 308212

URL: http://llvm.org/viewvc/llvm-project?rev=308212&view=rev
Log:
[codeview] Remove TypeServerHandler and PDBTypeServerHandler

Summary:
Instead of wiring these through the CVTypeVisitor interface, clients
should inspect the CVTypeArray before visiting it and potentially load
up the type server's TPI stream if they need it.

No tests relied on this functionality because LLD was the only client.

Reviewers: ruiu

Subscribers: mgorny, hiraditya, zturner, llvm-commits

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

Modified:
    lld/trunk/COFF/PDB.cpp
    lld/trunk/test/COFF/pdb-type-server-missing.yaml

Modified: lld/trunk/COFF/PDB.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/PDB.cpp?rev=308212&r1=308211&r2=308212&view=diff
==============================================================================
--- lld/trunk/COFF/PDB.cpp (original)
+++ lld/trunk/COFF/PDB.cpp Mon Jul 17 13:28:06 2017
@@ -33,7 +33,6 @@
 #include "llvm/DebugInfo/PDB/Native/PDBFile.h"
 #include "llvm/DebugInfo/PDB/Native/PDBFileBuilder.h"
 #include "llvm/DebugInfo/PDB/Native/PDBStringTableBuilder.h"
-#include "llvm/DebugInfo/PDB/Native/PDBTypeServerHandler.h"
 #include "llvm/DebugInfo/PDB/Native/TpiStream.h"
 #include "llvm/DebugInfo/PDB/Native/TpiStreamBuilder.h"
 #include "llvm/Object/COFF.h"
@@ -97,12 +96,6 @@ private:
   /// table.
   DebugStringTableSubsection PDBStrTab;
 
-  // Follow type servers.  If the same type server is encountered more than once
-  // for this instance of `PDBTypeServerHandler` (for example if many object
-  // files reference the same TypeServer), the types from the TypeServer will
-  // only be visited once.
-  pdb::PDBTypeServerHandler TSHandler;
-
   llvm::SmallString<128> NativePath;
 
   std::vector<pdb::SecMapEntry> SectionMap;
@@ -163,15 +156,14 @@ void PDBLinker::mergeDebugT(ObjectFile *
   // archive, look next to the archive path.
   StringRef LocalPath =
       !File->ParentName.empty() ? File->ParentName : File->getName();
-  TSHandler.addSearchPath(sys::path::parent_path(LocalPath));
+  (void)LocalPath; // FIXME: Implement type server handling here.
 
   BinaryByteStream Stream(Data, support::little);
   CVTypeArray Types;
   BinaryStreamReader Reader(Stream);
   if (auto EC = Reader.readArray(Types, Reader.getLength()))
     fatal(EC, "Reader::readArray failed");
-  if (auto Err = mergeTypeAndIdRecords(IDTable, TypeTable, TypeIndexMap,
-                                       &TSHandler, Types))
+  if (auto Err = mergeTypeAndIdRecords(IDTable, TypeTable, TypeIndexMap, Types))
     fatal(Err, "codeview::mergeTypeStreams failed");
 }
 

Modified: lld/trunk/test/COFF/pdb-type-server-missing.yaml
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/COFF/pdb-type-server-missing.yaml?rev=308212&r1=308211&r2=308212&view=diff
==============================================================================
--- lld/trunk/test/COFF/pdb-type-server-missing.yaml (original)
+++ lld/trunk/test/COFF/pdb-type-server-missing.yaml Mon Jul 17 13:28:06 2017
@@ -1,6 +1,9 @@
 # This is an object compiled with /Zi (see the LF_TYPESERVER2 record) without an
 # adjacent type server PDB. Test that LLD fails gracefully on it.
 
+# FIXME: Type server handling was removed from LLVM.
+# XFAIL: *
+
 # FIXME: Ideally we'd do what MSVC does, which is to warn and drop all debug
 # info in the object with the missing PDB.
 




More information about the llvm-commits mailing list