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:
parent
cca0a0ee45
commit
316649be7d
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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))
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user