forked from OSchip/llvm-project
Put global classes into the appropriate namespace.
Most of the cases belong into an anonymous namespace. No functionality change intended. llvm-svn: 251515
This commit is contained in:
parent
e003ca2a03
commit
039b10423a
|
@ -1593,6 +1593,7 @@ static Instruction *getFirstInst(Instruction *FirstInst, Value *V,
|
|||
return nullptr;
|
||||
}
|
||||
|
||||
namespace {
|
||||
/// \brief IR Values for the lower and upper bounds of a pointer evolution. We
|
||||
/// need to use value-handles because SCEV expansion can invalidate previously
|
||||
/// expanded values. Thus expansion of a pointer can invalidate the bounds for
|
||||
|
@ -1601,6 +1602,7 @@ struct PointerBounds {
|
|||
TrackingVH<Value> Start;
|
||||
TrackingVH<Value> End;
|
||||
};
|
||||
} // end anonymous namespace
|
||||
|
||||
/// \brief Expand code for the lower and upper bound of the pointer group \p CG
|
||||
/// in \p TheLoop. \return the values for the bounds.
|
||||
|
|
|
@ -7364,6 +7364,7 @@ ScalarEvolution::isLoopEntryGuardedByCond(const Loop *L,
|
|||
return false;
|
||||
}
|
||||
|
||||
namespace {
|
||||
/// RAII wrapper to prevent recursive application of isImpliedCond.
|
||||
/// ScalarEvolution's PendingLoopPredicates set must be empty unless we are
|
||||
/// currently evaluating isImpliedCond.
|
||||
|
@ -7381,6 +7382,7 @@ struct MarkPendingLoopPredicate {
|
|||
LoopPreds.erase(Cond);
|
||||
}
|
||||
};
|
||||
} // end anonymous namespace
|
||||
|
||||
/// isImpliedCond - Test whether the condition described by Pred, LHS,
|
||||
/// and RHS is true whenever the given Cond value evaluates to true.
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
|
||||
using namespace llvm;
|
||||
|
||||
namespace {
|
||||
// Insn shuffling priority.
|
||||
class HexagonBid {
|
||||
// The priority is directly proportional to how restricted the insn is based
|
||||
|
@ -75,6 +76,7 @@ public:
|
|||
return false;
|
||||
};
|
||||
};
|
||||
} // end anonymous namespace
|
||||
|
||||
unsigned HexagonResource::setWeight(unsigned s) {
|
||||
const unsigned SlotWeight = 8;
|
||||
|
|
|
@ -2094,8 +2094,7 @@ bool MipsAsmParser::expandJalWithRegs(MCInst &Inst, SMLoc IDLoc,
|
|||
}
|
||||
|
||||
/// Can the value be represented by a unsigned N-bit value and a shift left?
|
||||
template<unsigned N>
|
||||
bool isShiftedUIntAtAnyPosition(uint64_t x) {
|
||||
template <unsigned N> static bool isShiftedUIntAtAnyPosition(uint64_t x) {
|
||||
unsigned BitNum = findFirstSet(x);
|
||||
|
||||
return (x == x >> BitNum << BitNum) && isUInt<N>(x >> BitNum);
|
||||
|
|
|
@ -60,15 +60,15 @@ void SystemZInstPrinter::printRegName(raw_ostream &O, unsigned RegNo) const {
|
|||
O << '%' << getRegisterName(RegNo);
|
||||
}
|
||||
|
||||
template<unsigned N>
|
||||
void printUImmOperand(const MCInst *MI, int OpNum, raw_ostream &O) {
|
||||
template <unsigned N>
|
||||
static void printUImmOperand(const MCInst *MI, int OpNum, raw_ostream &O) {
|
||||
int64_t Value = MI->getOperand(OpNum).getImm();
|
||||
assert(isUInt<N>(Value) && "Invalid uimm argument");
|
||||
O << Value;
|
||||
}
|
||||
|
||||
template<unsigned N>
|
||||
void printSImmOperand(const MCInst *MI, int OpNum, raw_ostream &O) {
|
||||
template <unsigned N>
|
||||
static void printSImmOperand(const MCInst *MI, int OpNum, raw_ostream &O) {
|
||||
int64_t Value = MI->getOperand(OpNum).getImm();
|
||||
assert(isInt<N>(Value) && "Invalid simm argument");
|
||||
O << Value;
|
||||
|
|
|
@ -95,11 +95,13 @@ X86GenericDisassembler::X86GenericDisassembler(
|
|||
llvm_unreachable("Invalid CPU mode");
|
||||
}
|
||||
|
||||
namespace {
|
||||
struct Region {
|
||||
ArrayRef<uint8_t> Bytes;
|
||||
uint64_t Base;
|
||||
Region(ArrayRef<uint8_t> Bytes, uint64_t Base) : Bytes(Bytes), Base(Base) {}
|
||||
};
|
||||
} // end anonymous namespace
|
||||
|
||||
/// A callback function that wraps the readByte method from Region.
|
||||
///
|
||||
|
|
Loading…
Reference in New Issue