[PATCH] D50971: [Sparc] Avoid writing outside array in applyFixup
James Y Knight via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Aug 26 09:57:26 PDT 2018
jyknight accepted this revision.
jyknight added inline comments.
This revision is now accepted and ready to land.
================
Comment at: lib/Target/Sparc/MCTargetDesc/SparcAsmBackend.cpp:103
+/// getFixupKindNumBytes - The number of bytes the fixup may change.
+static unsigned getFixupKindNumBytes(unsigned Kind) {
----------------
I see this is the same way other targets do it, so, fine. But it seems rather unfortunate that this is separate from MCFixupKindInfo. And, for that matter, that applyFixup is implemented in every AsmBackend, despite doing afaict the same thing in each of them, only implemented slightly differently.
*shrug*.
Repository:
rL LLVM
https://reviews.llvm.org/D50971
More information about the llvm-commits
mailing list