From 05299c7d98ab5562ebf927847126621826358907 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Thu, 7 Nov 2019 16:48:35 +0000 Subject: [PATCH] X86FrameLowering - fix bool to unsigned cast static analyzer warnings. NFCI. --- llvm/lib/Target/X86/X86FrameLowering.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/llvm/lib/Target/X86/X86FrameLowering.cpp b/llvm/lib/Target/X86/X86FrameLowering.cpp index 0d4db14..a8f9c43 100644 --- a/llvm/lib/Target/X86/X86FrameLowering.cpp +++ b/llvm/lib/Target/X86/X86FrameLowering.cpp @@ -92,7 +92,7 @@ bool X86FrameLowering::hasFP(const MachineFunction &MF) const { MFI.hasCopyImplyingStackAdjustment()); } -static unsigned getSUBriOpcode(unsigned IsLP64, int64_t Imm) { +static unsigned getSUBriOpcode(bool IsLP64, int64_t Imm) { if (IsLP64) { if (isInt<8>(Imm)) return X86::SUB64ri8; @@ -104,7 +104,7 @@ static unsigned getSUBriOpcode(unsigned IsLP64, int64_t Imm) { } } -static unsigned getADDriOpcode(unsigned IsLP64, int64_t Imm) { +static unsigned getADDriOpcode(bool IsLP64, int64_t Imm) { if (IsLP64) { if (isInt<8>(Imm)) return X86::ADD64ri8; @@ -116,12 +116,12 @@ static unsigned getADDriOpcode(unsigned IsLP64, int64_t Imm) { } } -static unsigned getSUBrrOpcode(unsigned isLP64) { - return isLP64 ? X86::SUB64rr : X86::SUB32rr; +static unsigned getSUBrrOpcode(bool IsLP64) { + return IsLP64 ? X86::SUB64rr : X86::SUB32rr; } -static unsigned getADDrrOpcode(unsigned isLP64) { - return isLP64 ? X86::ADD64rr : X86::ADD32rr; +static unsigned getADDrrOpcode(bool IsLP64) { + return IsLP64 ? X86::ADD64rr : X86::ADD32rr; } static unsigned getANDriOpcode(bool IsLP64, int64_t Imm) { @@ -135,7 +135,7 @@ static unsigned getANDriOpcode(bool IsLP64, int64_t Imm) { return X86::AND32ri; } -static unsigned getLEArOpcode(unsigned IsLP64) { +static unsigned getLEArOpcode(bool IsLP64) { return IsLP64 ? X86::LEA64r : X86::LEA32r; } -- 2.7.4