1
1
mirror of https://github.com/rui314/mold.git synced 2024-12-27 10:23:41 +03:00

temporary

This commit is contained in:
Rui Ueyama 2020-10-11 13:21:58 +09:00
parent 6f33bd6dc3
commit d1047dbf4f

10
main.cc
View File

@ -109,7 +109,6 @@ int main(int argc, char **argv) {
llvm::Timer AddFilesTimer("add_files", "add_files", Timers);
llvm::Timer ParseTimer("parse", "parse", Timers);
llvm::Timer RegisterDefined("register_defined_symbols", "register_defined_symbols", Timers);
llvm::Timer CreateSymtab("create_symtab", "create_symtab", Timers);
if (auto *arg = args.getLastArg(OPT_o))
config.output = arg->getValue();
@ -133,18 +132,13 @@ int main(int argc, char **argv) {
ParseTimer.stopTimer();
RegisterDefined.startTimer();
// for (ObjectFile *file : files)
// file->register_defined_symbols();
tbb::parallel_for_each(
files.begin(), files.end(),
[](ObjectFile *file) { file->register_defined_symbols(); });
// for (ObjectFile *file : files)
// file->register_defined_symbols();
RegisterDefined.stopTimer();
CreateSymtab.startTimer();
std::vector<StringRef> symbols = symbol_table.get_keys();
std::sort(symbols.begin(), symbols.end());
CreateSymtab.stopTimer();
write();
llvm::outs() << "num_files=" << num_files
<< " num_symbols=" << num_symbols