[PATCH] D21681: [ELF] - Implemented support of default/non-default symbols versions
Joerg Sonnenberger via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 24 07:41:35 PDT 2016
On Fri, Jun 24, 2016 at 12:14:59PM +0000, George Rimar via llvm-commits wrote:
> grimar added inline comments.
>
> ================
> Comment at: ELF/SymbolTable.cpp:167
> @@ +166,3 @@
> +static void setupVersionAttributes(Symbol *Sym, StringRef Name) {
> + size_t VersionBegin = Name.find("@");
> + Sym->VersionedName = VersionBegin != StringRef::npos;
> ----------------
> ruiu wrote:
> > Before running benchmarks, please change this to `Name.find('@')`. find(char) should be faster than find(StringRef).
> Ok. Btw we probably can avoid doing that search if not linking shared or have no Config->SymbolVersions.
> I think we can assume that there is no versioning an that case.
No, I don't think that's a valid assumption. Using symbol versioning
makes perfect sense for statically linked applications as well.
Joerg
More information about the llvm-commits
mailing list