Commit 86021d98 authored by Simon Pilgrim's avatar Simon Pilgrim
Browse files

[X86] Avoid a std::string copy by replacing auto with const auto&. NFC.

Fixes msvc analyzer warning.
parent 64132f54
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -2516,7 +2516,7 @@ Value *X86TargetLowering::getIRStackGuard(IRBuilder<> &IRB) const {
      if (Offset == (unsigned)-1)
        Offset = (Subtarget.is64Bit()) ? 0x28 : 0x14;
      auto GuardReg = getTargetMachine().Options.StackProtectorGuardReg;
      const auto &GuardReg = getTargetMachine().Options.StackProtectorGuardReg;
      if (GuardReg == "fs")
        AddressSpace = X86AS::FS;
      else if (GuardReg == "gs")