[PATCH] D26474: Parse resolations only once
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 9 14:52:46 PST 2016
ruiu accepted this revision.
ruiu added a comment.
This revision is now accepted and ready to land.
LGTM
================
Comment at: ELF/ICF.cpp:122-124
uint64_t Flags = S->Flags;
uint64_t H = hash_combine(Flags, S->getSize());
+ return hash_combine(H, S->NumRelocations);
----------------
return hash_combine(S->Flags, S->getSize(), S->NumRelocations);
================
Comment at: ELF/InputFiles.cpp:394-396
+ if (Target->FirstRelocation)
+ fatal(getFilename(this) +
+ ": multiple relocation sections to one section are not supported");
----------------
You can do this check earlier, after `if (!Target) return nullptr`. Then you can directly assign to Target->FirstRelocation etc.
https://reviews.llvm.org/D26474
More information about the llvm-commits
mailing list