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

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 22 18:57:52 PDT 2019


MaskRay added a comment.

Looks quite good to me. Some nits.



================
Comment at: lld/ELF/Driver.cpp:1452
+  for (Partition &Part : Partitions) {
+    if (Part.Name != PartName)
+      continue;
----------------
Early continue doesn't seem to help readability here. How about
```
if (Part.Name == PartName) {
  Sym->Partition = Part.getNumber();
  return;
}
```


================
Comment at: lld/ELF/SyntheticSections.h:42
                      InputSectionBase::Synthetic) {
-    this->Live = true;
+    this->markLive();
   }
----------------
Is `this->` redundant?


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