[PATCH] D99079: [ARM][AArch64] Require appropriate features for crypto algorithms
Tim Northover via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 26 08:09:36 PDT 2021
t.p.northover added inline comments.
================
Comment at: clang/lib/Driver/ToolChains/Arch/ARM.cpp:641
+ });
+ if ((ItSHA2 != Features.rend()) || (ItSHA2 != Features.rend()))
+ Features.push_back("-crypto");
----------------
Both of these checks are identical.
And could we get a comment on the purpose of this sequence? I think I can see mechanically what it's doing after a bit of thought, but still haven't come up with an example of the kind of problem it's trying to fix (not that I've tried terribly hard, that's what comments are for).
================
Comment at: clang/lib/Driver/ToolChains/Arch/ARM.cpp:643
+ Features.push_back("-crypto");
+ if (ItSHA2 != Features.rend()) {
+ HasSHA2 = ItSHA2->take_front() == "+";
----------------
I think modifying `Features` above might have invalidated the iterator.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99079/new/
https://reviews.llvm.org/D99079
More information about the llvm-commits
mailing list