mirror of
				https://github.com/c64scene-ar/llvm-6502.git
				synced 2025-10-31 08:16:47 +00:00 
			
		
		
		
	Rename MCValue::getCst to getConstant and add MCValue::isConstant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74440 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
		| @@ -30,10 +30,11 @@ class MCValue { | |||||||
|   int64_t Cst; |   int64_t Cst; | ||||||
| public: | public: | ||||||
|  |  | ||||||
|   int64_t getCst() const { return Cst; } |   int64_t getConstant() const { return Cst; } | ||||||
|   MCSymbol *getSymA() const { return SymA; } |   MCSymbol *getSymA() const { return SymA; } | ||||||
|   MCSymbol *getSymB() const { return SymB; } |   MCSymbol *getSymB() const { return SymB; } | ||||||
|    |  | ||||||
|  |   bool isConstant() const { return !SymA && !SymB; } | ||||||
|    |    | ||||||
|   static MCValue get(MCSymbol *SymA, MCSymbol *SymB = 0, int64_t Val = 0) { |   static MCValue get(MCSymbol *SymA, MCSymbol *SymB = 0, int64_t Val = 0) { | ||||||
|     MCValue R; |     MCValue R; | ||||||
|   | |||||||
| @@ -66,11 +66,11 @@ static inline raw_ostream &operator<<(raw_ostream &os, const MCValue &Value) { | |||||||
|     os << Value.getSymA()->getName(); |     os << Value.getSymA()->getName(); | ||||||
|     if (Value.getSymB()) |     if (Value.getSymB()) | ||||||
|       os << " - " << Value.getSymB()->getName(); |       os << " - " << Value.getSymB()->getName(); | ||||||
|     if (Value.getCst()) |     if (Value.getConstant()) | ||||||
|       os << " + " << Value.getCst(); |       os << " + " << Value.getConstant(); | ||||||
|   } else { |   } else { | ||||||
|     assert(!Value.getSymB() && "Invalid machine code value!"); |     assert(!Value.getSymB() && "Invalid machine code value!"); | ||||||
|     os << Value.getCst(); |     os << Value.getConstant(); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   return os; |   return os; | ||||||
| @@ -83,7 +83,7 @@ static inline int64_t truncateToSize(int64_t Value, unsigned Bytes) { | |||||||
|  |  | ||||||
| static inline MCValue truncateToSize(const MCValue &Value, unsigned Bytes) { | static inline MCValue truncateToSize(const MCValue &Value, unsigned Bytes) { | ||||||
|   return MCValue::get(Value.getSymA(), Value.getSymB(),  |   return MCValue::get(Value.getSymA(), Value.getSymB(),  | ||||||
|                       truncateToSize(Value.getCst(), Bytes)); |                       truncateToSize(Value.getConstant(), Bytes)); | ||||||
| } | } | ||||||
|  |  | ||||||
| void MCAsmStreamer::SwitchSection(MCSection *Section) { | void MCAsmStreamer::SwitchSection(MCSection *Section) { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user