This effectively rolls back r263133. I think moving this code to
Driver was a violation of modularization, and it felt odd to me that
driver was manipulating the details of the internal symbols.
Details
- Reviewers
grimar
Diff Detail
Event Timeline
Ok, but why don't you want to stay on initial version http://reviews.llvm.org/D18047 ?
That keeps initSymbols() in symbols.cpp, but does not initialize them for each ELFT.
May be revert of r263214 is enough here ?
Sorry, I replied to a different thread.
So, it's ecause that Symbol.cpp needs to initialize symbols for each ELF type is an internal detail of the file. initSymbol, or in general, init<filename> is the initializer function for a file. Callers of the initializer should not take care of the details whether the function works on ELFT-specialized objects or not.
I would probably hold this until we need a second initSomething function.
Cheers,
Rafael
That is arguable. Here it do excessive work when initializing something that is not used. That has no impact on perfomance but actually confuses, makes code reader to think that these symbols are required somehow when them are not.
I would agree with Rafael here to hold it if possible until we see any other initXXX function.
I'm not convinced that that is not worth it, but no reason to push this strongly, so I'm okay to abandon it for now.