[PATCH] D67039: [ELF] Add a spell corrector for "undefined symbol" diagnostics
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 2 00:53:48 PDT 2019
ruiu added inline comments.
================
Comment at: ELF/Relocations.cpp:694
+static const Symbol *correctSpelling(const Symbol &sym) {
+ // Build a map of local defined symbols.
----------------
Please add a file comment saying that this function is for "did you mean?" feature.
================
Comment at: ELF/Relocations.cpp:721
+ StringRef name = sym.getName();
+ for (size_t i = 0, e = name.size(); i != e + 1; ++i) {
+ // Insert a character before name[i].
----------------
IIUC, this function costs (N+1)*74 where N is the length of a symbol name. Symbol names can be very long. Doesn't this too slow?
Repository:
rLLD LLVM Linker
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67039/new/
https://reviews.llvm.org/D67039
More information about the llvm-commits
mailing list