[PATCH] D129062: [lld-macho] Handle user-provided dtrace symbols to avoid linking failure
Jez Ng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 5 20:29:20 PDT 2022
int3 added inline comments.
================
Comment at: lld/MachO/Dtrace.cpp:17-22
+bool lld::macho::isDtraceSym(StringRef name) {
+ if (name.substr(0, 10) == "___dtrace_") {
+ return true;
+ }
+ return false;
+}
----------------
int3 wrote:
> BertalanD wrote:
> > It looks like this function might be quite hot. Do you think it would make sense for it to be an inline function in the header file?
>
Agreed. In fact we could take it one step further though and eliminate the function entirely... the call to this can just be replaced by `name.startswith("___dtrace_")`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129062/new/
https://reviews.llvm.org/D129062
More information about the llvm-commits
mailing list