[PATCH] D144872: [AIX] Align the content of an xcoff object file which has auxiliary header in big archive.

Digger Lin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 1 06:44:49 PDT 2023


DiggerLin marked an inline comment as done.
DiggerLin added inline comments.


================
Comment at: llvm/lib/Object/ArchiveWriter.cpp:894-895
       Symbols = std::move(*SymbolsOrErr);
+      if (CurSymFile)
+        HasObject = true;
     }
----------------
jhenderson wrote:
> Did you see my aside about HasObject at the end of my long inline comment? Can the logic around `HasObject` be simplified in the latest version. I've not followed it enough to be confident either way.
 

> Can the logic around HasObject be simplified in the latest version.

 I do not think HasObject be simplified, in the loop 

```
    for (auto M = NewMembers.begin(); M < NewMembers.end(); ++M) {  
 .....
     if (CurSymFile)
        HasObject = true;
  ....
 }
 .....
    if (HasObject && SymNames.tell() == 0 && !isCOFFArchive(Kind))
    SymNames << '\0' << '\0' << '\0';
  return Ret;
```

if any of member is symbolicFile and SymName is empty and  !isCOFFArchive(Kind)) , it will 
    SymNames << '\0' << '\0' << '\0'; 

I do not think we can simplify it.



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144872/new/

https://reviews.llvm.org/D144872



More information about the llvm-commits mailing list