mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 19:23:23 +01:00
Make some symbols static, move classes into anonymous namespaces.
llvm-svn: 117111
This commit is contained in:
parent
bd0ca690c8
commit
9e988fe81e
@ -45,7 +45,7 @@ STATISTIC(numSimpleRegions, "The # of simple regions");
|
||||
/// PrintStyle - Print region in difference ways.
|
||||
enum PrintStyle { PrintNone, PrintBB, PrintRN };
|
||||
|
||||
cl::opt<enum PrintStyle> printStyle("print-region-style", cl::Hidden,
|
||||
static cl::opt<enum PrintStyle> printStyle("print-region-style", cl::Hidden,
|
||||
cl::desc("style of printing regions"),
|
||||
cl::values(
|
||||
clEnumValN(PrintNone, "none", "print no details"),
|
||||
|
@ -260,23 +260,20 @@ int EDOperand::isMemory() {
|
||||
}
|
||||
|
||||
#ifdef __BLOCKS__
|
||||
struct RegisterReaderWrapper {
|
||||
EDOperand::EDRegisterBlock_t regBlock;
|
||||
};
|
||||
namespace {
|
||||
struct RegisterReaderWrapper {
|
||||
EDOperand::EDRegisterBlock_t regBlock;
|
||||
};
|
||||
}
|
||||
|
||||
int readerWrapperCallback(uint64_t *value,
|
||||
unsigned regID,
|
||||
void *arg) {
|
||||
struct RegisterReaderWrapper *wrapper = (struct RegisterReaderWrapper *)arg;
|
||||
static int readerWrapperCallback(uint64_t *value, unsigned regID, void *arg) {
|
||||
RegisterReaderWrapper *wrapper = (RegisterReaderWrapper *)arg;
|
||||
return wrapper->regBlock(value, regID);
|
||||
}
|
||||
|
||||
int EDOperand::evaluate(uint64_t &result,
|
||||
EDRegisterBlock_t regBlock) {
|
||||
struct RegisterReaderWrapper wrapper;
|
||||
int EDOperand::evaluate(uint64_t &result, EDRegisterBlock_t regBlock) {
|
||||
RegisterReaderWrapper wrapper;
|
||||
wrapper.regBlock = regBlock;
|
||||
return evaluate(result,
|
||||
readerWrapperCallback,
|
||||
(void*)&wrapper);
|
||||
return evaluate(result, readerWrapperCallback, (void*)&wrapper);
|
||||
}
|
||||
#endif
|
||||
|
@ -44,7 +44,8 @@ const char *PTXTargetLowering::getTargetNodeName(unsigned Opcode) const {
|
||||
// Calling Convention Implementation
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
static struct argmap_entry {
|
||||
namespace {
|
||||
struct argmap_entry {
|
||||
MVT::SimpleValueType VT;
|
||||
TargetRegisterClass *RC;
|
||||
TargetRegisterClass::iterator loc;
|
||||
@ -52,12 +53,13 @@ static struct argmap_entry {
|
||||
argmap_entry(MVT::SimpleValueType _VT, TargetRegisterClass *_RC)
|
||||
: VT(_VT), RC(_RC), loc(_RC->begin()) {}
|
||||
|
||||
void reset(void) { loc = RC->begin(); }
|
||||
bool operator==(MVT::SimpleValueType _VT) { return VT == _VT; }
|
||||
void reset() { loc = RC->begin(); }
|
||||
bool operator==(MVT::SimpleValueType _VT) const { return VT == _VT; }
|
||||
} argmap[] = {
|
||||
argmap_entry(MVT::i1, PTX::PredsRegisterClass),
|
||||
argmap_entry(MVT::i32, PTX::RRegs32RegisterClass)
|
||||
};
|
||||
} // end anonymous namespace
|
||||
|
||||
static SDValue lower_kernel_argument(int i,
|
||||
SDValue Chain,
|
||||
|
@ -40,6 +40,7 @@ static ManagedStatic<sys::SmartMutex<true> > Lock;
|
||||
// PassRegistryImpl
|
||||
//
|
||||
|
||||
namespace {
|
||||
struct PassRegistryImpl {
|
||||
/// PassInfoMap - Keep track of the PassInfo object for each registered pass.
|
||||
typedef DenseMap<const void*, const PassInfo*> MapType;
|
||||
@ -57,6 +58,7 @@ struct PassRegistryImpl {
|
||||
std::vector<const PassInfo*> ToFree;
|
||||
std::vector<PassRegistrationListener*> Listeners;
|
||||
};
|
||||
} // end anonymous namespace
|
||||
|
||||
void *PassRegistry::getImpl() const {
|
||||
if (!pImpl)
|
||||
|
@ -106,7 +106,7 @@ namespace { // Anonymous namespace for class
|
||||
char PreVerifier::ID = 0;
|
||||
INITIALIZE_PASS(PreVerifier, "preverify", "Preliminary module verification",
|
||||
false, false)
|
||||
char &PreVerifyID = PreVerifier::ID;
|
||||
static char &PreVerifyID = PreVerifier::ID;
|
||||
|
||||
namespace {
|
||||
class TypeSet : public AbstractTypeUser {
|
||||
|
@ -365,7 +365,7 @@ void DisassemblerTables::emitContextDecision(
|
||||
uint32_t &i2,
|
||||
ContextDecision &decision,
|
||||
const char* name) const {
|
||||
o2.indent(i2) << "struct ContextDecision " << name << " = {" << "\n";
|
||||
o2.indent(i2) << "static struct ContextDecision " << name << " = {\n";
|
||||
i2++;
|
||||
o2.indent(i2) << "{ /* opcodeDecisions */" << "\n";
|
||||
i2++;
|
||||
@ -392,8 +392,7 @@ void DisassemblerTables::emitContextDecision(
|
||||
|
||||
void DisassemblerTables::emitInstructionInfo(raw_ostream &o, uint32_t &i)
|
||||
const {
|
||||
o.indent(i * 2) << "struct InstructionSpecifier ";
|
||||
o << INSTRUCTIONS_STR << "[";
|
||||
o.indent(i * 2) << "static struct InstructionSpecifier " INSTRUCTIONS_STR "[";
|
||||
o << InstructionSpecifiers.size();
|
||||
o << "] = {" << "\n";
|
||||
|
||||
@ -456,8 +455,7 @@ void DisassemblerTables::emitInstructionInfo(raw_ostream &o, uint32_t &i)
|
||||
void DisassemblerTables::emitContextTable(raw_ostream &o, uint32_t &i) const {
|
||||
uint16_t index;
|
||||
|
||||
o.indent(i * 2) << "InstructionContext ";
|
||||
o << CONTEXTS_STR << "[256] = {" << "\n";
|
||||
o.indent(i * 2) << "static InstructionContext " CONTEXTS_STR "[256] = {\n";
|
||||
i++;
|
||||
|
||||
for (index = 0; index < 256; ++index) {
|
||||
|
Loading…
Reference in New Issue
Block a user