Use getChildOffset instead of getBuffer for identifying a member.

I am adding support for thin archives. On those, getting the buffer
involves reading another file.

Since we only need an id in here, use the member offset in the archive.

llvm-svn: 242205
diff --git a/lld/COFF/InputFiles.cpp b/lld/COFF/InputFiles.cpp
index 66d792b..d9312f6 100644
--- a/lld/COFF/InputFiles.cpp
+++ b/lld/COFF/InputFiles.cpp
@@ -76,7 +76,7 @@
   // all members are mapped to false, which indicates all these files
   // are not read yet.
   for (const Archive::Child &Child : File->children())
-    Seen[Child.getBuffer().data()].clear();
+    Seen[Child.getChildOffset()].clear();
   return std::error_code();
 }
 
@@ -89,8 +89,7 @@
   Archive::child_iterator It = ItOrErr.get();
 
   // Return an empty buffer if we have already returned the same buffer.
-  const char *StartAddr = It->getBuffer().data();
-  if (Seen[StartAddr].test_and_set())
+  if (Seen[It->getChildOffset()].test_and_set())
     return MemoryBufferRef();
   return It->getMemoryBufferRef();
 }