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