[PATCH] D60353: ELF: Add basic partition data structures and behaviours.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon May 13 01:42:22 PDT 2019


grimar added inline comments.


================
Comment at: lld/ELF/Driver.cpp:1419
+  NewPart.Name = PartName;
+  Sym->Partition = NewPart.getNumber();
+}
----------------
grimar wrote:
> It seems to me this is an overoptimization for such place.
> 
> What do you think about the following?
> ```
>   Partition P = {PartName};
>   Sym->Partition = P.getNumber();
> ```
Oops. My version was wrong. But anyways something like:

```
  Partitions.push_back({PartName});
  Sym->Partition = Partitions.back().getNumber();
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D60353





More information about the llvm-commits mailing list