[llvm] 890707a - [X86] Avoid llvm-qualified-auto warning by not using auto. NFC.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 3 06:25:26 PDT 2020
Author: Simon Pilgrim
Date: 2020-09-03T14:21:17+01:00
New Revision: 890707aa0169a259ab8572091120756aec2d0c06
URL: https://github.com/llvm/llvm-project/commit/890707aa0169a259ab8572091120756aec2d0c06
DIFF: https://github.com/llvm/llvm-project/commit/890707aa0169a259ab8572091120756aec2d0c06.diff
LOG: [X86] Avoid llvm-qualified-auto warning by not using auto. NFC.
Try to consistently use the actual type name in the file.
Added:
Modified:
llvm/lib/Target/X86/X86FixupBWInsts.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/X86/X86FixupBWInsts.cpp b/llvm/lib/Target/X86/X86FixupBWInsts.cpp
index 78de041329e2..f8d822aebc5b 100644
--- a/llvm/lib/Target/X86/X86FixupBWInsts.cpp
+++ b/llvm/lib/Target/X86/X86FixupBWInsts.cpp
@@ -187,8 +187,7 @@ bool FixupBWInstPass::runOnMachineFunction(MachineFunction &MF) {
/// If so, return that super register in \p SuperDestReg.
bool FixupBWInstPass::getSuperRegDestIfDead(MachineInstr *OrigMI,
Register &SuperDestReg) const {
- auto *TRI = &TII->getRegisterInfo();
-
+ const X86RegisterInfo *TRI = &TII->getRegisterInfo();
Register OrigDestReg = OrigMI->getOperand(0).getReg();
SuperDestReg = getX86SubSuperRegister(OrigDestReg, 32);
@@ -320,7 +319,7 @@ MachineInstr *FixupBWInstPass::tryReplaceCopy(MachineInstr *MI) const {
// This is only correct if we access the same subregister index: otherwise,
// we could try to replace "movb %ah, %al" with "movl %eax, %eax".
- auto *TRI = &TII->getRegisterInfo();
+ const X86RegisterInfo *TRI = &TII->getRegisterInfo();
if (TRI->getSubRegIndex(NewSrcReg, OldSrc.getReg()) !=
TRI->getSubRegIndex(NewDestReg, OldDest.getReg()))
return nullptr;
More information about the llvm-commits
mailing list