lld: const-qualify iterations through VarStreamArray, NFC

No functionality change here; just unblocking a patch to LLVM.

GitOrigin-RevId: 9a2b54af221717bf71040b530c4ac8043e1db23a
diff --git a/COFF/DebugTypes.cpp b/COFF/DebugTypes.cpp
index 115b66c..67b708c 100644
--- a/COFF/DebugTypes.cpp
+++ b/COFF/DebugTypes.cpp
@@ -325,7 +325,7 @@
     m->tpiCounts.resize(m->getTypeTable().size());
     m->ipiCounts.resize(m->getIDTable().size());
     uint32_t srcIdx = nbHeadIndices;
-    for (CVType &ty : types) {
+    for (const CVType &ty : types) {
       TypeIndex dstIdx = tpiMap[srcIdx++];
       // Type merging may fail, so a complex source type may become the simple
       // NotTranslated type, which cannot be used as an array index.
diff --git a/COFF/PDB.cpp b/COFF/PDB.cpp
index 30d22db..a4cef1d 100644
--- a/COFF/PDB.cpp
+++ b/COFF/PDB.cpp
@@ -975,7 +975,7 @@
   // size as the original. Otherwise, the file references in the line and
   // inlinee line tables will be incorrect.
   auto newChecksums = std::make_unique<DebugChecksumsSubsection>(linker.pdbStrTab);
-  for (FileChecksumEntry &fc : checksums) {
+  for (const FileChecksumEntry &fc : checksums) {
     SmallString<128> filename =
         exitOnErr(cvStrTab.getString(fc.FileNameOffset));
     pdbMakeAbsolute(filename);
@@ -1781,7 +1781,7 @@
 
   Optional<uint32_t> nameIndex;
   Optional<uint32_t> lineNumber;
-  for (LineColumnEntry &entry : lines) {
+  for (const LineColumnEntry &entry : lines) {
     for (const LineNumberEntry &ln : entry.LineNumbers) {
       LineInfo li(ln.Flags);
       if (ln.Offset > offsetInLinetable) {