Move File from SymbolBody to Symbol.
With this Symbol has the same size as before, but DefinedRegular goes
from 72 to 64 bytes.
I also find this a bit easier to read. There are fewer places
initializing File for example.
This has a small but measurable speed improvement on all tests (1%
max).
llvm-svn: 310142
diff --git a/lld/ELF/MapFile.cpp b/lld/ELF/MapFile.cpp
index ed0961c..1e466b7 100644
--- a/lld/ELF/MapFile.cpp
+++ b/lld/ELF/MapFile.cpp
@@ -53,7 +53,7 @@
for (ObjFile<ELFT> *File : ObjFile<ELFT>::Instances)
for (SymbolBody *B : File->getSymbols())
if (auto *DR = dyn_cast<DefinedRegular>(B))
- if (DR->File == File && !DR->isSection() && DR->Section &&
+ if (DR->getFile() == File && !DR->isSection() && DR->Section &&
DR->Section->Live)
V.push_back(DR);
return V;