[lld] lld: add support for NOCROSSREFS(_TO) (PR #95714)

Peter Smith via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 17 11:01:13 PDT 2024


================
@@ -256,6 +256,11 @@ struct InsertCommand {
   StringRef where;
 };
 
+struct CrossRefList {
+  SmallVector<StringRef, 2> refs;
+  bool firstOnly;
----------------
smithp35 wrote:

I found firstOnly a bit too tied the implementation and needed a bit of referring to the documentation. I guess it is firstOnly as when we are 

Perhaps worth adding a comment
```
See documentation for NOCROSSREFS and NOCROSSREFS_TO. When firstOnly is false refs are output section names that must not have any cross references between them. When firstOnly is true. The first ref is the tosection and the rest are fromsections.


https://github.com/llvm/llvm-project/pull/95714


More information about the llvm-commits mailing list