1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00

Make helper functions static or move them into anonymous namespaces. NFC.

This commit is contained in:
Benjamin Kramer 2020-01-14 14:06:12 +01:00
parent cca0a0ee45
commit 316649be7d
4 changed files with 7 additions and 7 deletions

View File

@ -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<unsigned>::max()) + 1;
uint64_t Val64 = Token.integerValue().getLimitedValue(Limit);

View File

@ -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;

View File

@ -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))

View File

@ -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;