[llvm] [Thumb,ELF] Fix access to dso_preemptable __stack_chk_guard with static relocation model (PR #78950)
Nick Desaulniers via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 22 10:59:09 PST 2024
================
@@ -135,14 +135,15 @@ void Thumb1InstrInfo::loadRegFromStackSlot(MachineBasicBlock &MBB,
void Thumb1InstrInfo::expandLoadStackGuard(
MachineBasicBlock::iterator MI) const {
MachineFunction &MF = *MI->getParent()->getParent();
- const TargetMachine &TM = MF.getTarget();
const ARMSubtarget &ST = MF.getSubtarget<ARMSubtarget>();
+ const GlobalValue *GV =
+ cast<GlobalValue>((*MI->memoperands_begin())->getValue());
----------------
nickdesaulniers wrote:
`const auto *GV = ...`
https://llvm.org/docs/CodingStandards.html#use-auto-type-deduction-to-make-code-more-readable
(this can be fixed in llvm/lib/Target/ARM/Thumb2InstrInfo.cpp L264 as well)
https://github.com/llvm/llvm-project/pull/78950
More information about the llvm-commits
mailing list