diff --git a/lib/CodeGen/MIRParser/MIParser.cpp b/lib/CodeGen/MIRParser/MIParser.cpp index 63ed91d6719..076ca943788 100644 --- a/lib/CodeGen/MIRParser/MIParser.cpp +++ b/lib/CodeGen/MIRParser/MIParser.cpp @@ -1734,8 +1734,8 @@ static bool getHexUint(const MIToken &Token, APInt &Result) { return false; } -bool getUnsigned(const MIToken &Token, unsigned &Result, - ErrorCallbackType ErrCB) { +static bool getUnsigned(const MIToken &Token, unsigned &Result, + ErrorCallbackType ErrCB) { if (Token.hasIntegerValue()) { const uint64_t Limit = uint64_t(std::numeric_limits::max()) + 1; uint64_t Val64 = Token.integerValue().getLimitedValue(Limit); diff --git a/lib/Target/AArch64/AArch64FrameLowering.cpp b/lib/Target/AArch64/AArch64FrameLowering.cpp index c732106014e..7575d1a25e5 100644 --- a/lib/Target/AArch64/AArch64FrameLowering.cpp +++ b/lib/Target/AArch64/AArch64FrameLowering.cpp @@ -837,7 +837,7 @@ static bool isTargetDarwin(const MachineFunction &MF) { } // Convenience function to determine whether I is an SVE callee save. -bool IsSVECalleeSave(MachineBasicBlock::iterator I) { +static bool IsSVECalleeSave(MachineBasicBlock::iterator I) { switch (I->getOpcode()) { default: return false; diff --git a/lib/Target/Mips/MipsLegalizerInfo.cpp b/lib/Target/Mips/MipsLegalizerInfo.cpp index 39e53a75ac7..9645aa24dc0 100644 --- a/lib/Target/Mips/MipsLegalizerInfo.cpp +++ b/lib/Target/Mips/MipsLegalizerInfo.cpp @@ -341,9 +341,9 @@ static bool MSA3OpIntrinsicToGeneric(MachineInstr &MI, unsigned Opcode, return true; } -bool MSA2OpIntrinsicToGeneric(MachineInstr &MI, unsigned Opcode, - MachineIRBuilder &MIRBuilder, - const MipsSubtarget &ST) { +static bool MSA2OpIntrinsicToGeneric(MachineInstr &MI, unsigned Opcode, + MachineIRBuilder &MIRBuilder, + const MipsSubtarget &ST) { assert(ST.hasMSA() && "MSA intrinsic not supported on target without MSA."); MIRBuilder.buildInstr(Opcode) .add(MI.getOperand(0)) diff --git a/lib/Transforms/InstCombine/InstructionCombining.cpp b/lib/Transforms/InstCombine/InstructionCombining.cpp index e31023607e8..801c09a317a 100644 --- a/lib/Transforms/InstCombine/InstructionCombining.cpp +++ b/lib/Transforms/InstCombine/InstructionCombining.cpp @@ -1649,7 +1649,7 @@ Instruction *InstCombiner::narrowMathIfNoOverflow(BinaryOperator &BO) { return CastInst::Create(CastOpc, NarrowBO, BO.getType()); } -bool isMergedGEPInBounds(GEPOperator &GEP1, GEPOperator &GEP2) { +static bool isMergedGEPInBounds(GEPOperator &GEP1, GEPOperator &GEP2) { // At least one GEP must be inbounds. if (!GEP1.isInBounds() && !GEP2.isInBounds()) return false;