mirror of
				https://github.com/c64scene-ar/llvm-6502.git
				synced 2025-11-04 05:17:07 +00:00 
			
		
		
		
	Constify input argument of RelocVisitor and DWARFContext constructors. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@220228 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
		@@ -128,7 +128,7 @@ public:
 | 
				
			|||||||
  virtual ~DIContext();
 | 
					  virtual ~DIContext();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  /// getDWARFContext - get a context for binary DWARF data.
 | 
					  /// getDWARFContext - get a context for binary DWARF data.
 | 
				
			||||||
  static DIContext *getDWARFContext(object::ObjectFile &);
 | 
					  static DIContext *getDWARFContext(const object::ObjectFile &Obj);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  virtual void dump(raw_ostream &OS, DIDumpType DumpType = DIDT_All) = 0;
 | 
					  virtual void dump(raw_ostream &OS, DIDumpType DumpType = DIDT_All) = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -41,7 +41,7 @@ struct RelocToApply {
 | 
				
			|||||||
/// @brief Base class for object file relocation visitors.
 | 
					/// @brief Base class for object file relocation visitors.
 | 
				
			||||||
class RelocVisitor {
 | 
					class RelocVisitor {
 | 
				
			||||||
public:
 | 
					public:
 | 
				
			||||||
  explicit RelocVisitor(ObjectFile &Obj)
 | 
					  explicit RelocVisitor(const ObjectFile &Obj)
 | 
				
			||||||
    : ObjToVisit(Obj), HasError(false) {}
 | 
					    : ObjToVisit(Obj), HasError(false) {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // TODO: Should handle multiple applied relocations via either passing in the
 | 
					  // TODO: Should handle multiple applied relocations via either passing in the
 | 
				
			||||||
@@ -60,7 +60,7 @@ public:
 | 
				
			|||||||
  bool error() { return HasError; }
 | 
					  bool error() { return HasError; }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
private:
 | 
					private:
 | 
				
			||||||
  ObjectFile &ObjToVisit;
 | 
					  const ObjectFile &ObjToVisit;
 | 
				
			||||||
  bool HasError;
 | 
					  bool HasError;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  RelocToApply visitELF(uint32_t RelocType, RelocationRef R, uint64_t Value) {
 | 
					  RelocToApply visitELF(uint32_t RelocType, RelocationRef R, uint64_t Value) {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -13,6 +13,6 @@ using namespace llvm;
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
DIContext::~DIContext() {}
 | 
					DIContext::~DIContext() {}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
DIContext *DIContext::getDWARFContext(object::ObjectFile &Obj) {
 | 
					DIContext *DIContext::getDWARFContext(const object::ObjectFile &Obj) {
 | 
				
			||||||
  return new DWARFContextInMemory(Obj);
 | 
					  return new DWARFContextInMemory(Obj);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -509,7 +509,7 @@ static bool consumeCompressedDebugSectionHeader(StringRef &data,
 | 
				
			|||||||
  return true;
 | 
					  return true;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
DWARFContextInMemory::DWARFContextInMemory(object::ObjectFile &Obj)
 | 
					DWARFContextInMemory::DWARFContextInMemory(const object::ObjectFile &Obj)
 | 
				
			||||||
    : IsLittleEndian(Obj.isLittleEndian()),
 | 
					    : IsLittleEndian(Obj.isLittleEndian()),
 | 
				
			||||||
      AddressSize(Obj.getBytesInAddress()) {
 | 
					      AddressSize(Obj.getBytesInAddress()) {
 | 
				
			||||||
  for (const SectionRef &Section : Obj.sections()) {
 | 
					  for (const SectionRef &Section : Obj.sections()) {
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -240,7 +240,7 @@ class DWARFContextInMemory : public DWARFContext {
 | 
				
			|||||||
  SmallVector<SmallString<32>, 4> UncompressedSections;
 | 
					  SmallVector<SmallString<32>, 4> UncompressedSections;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public:
 | 
					public:
 | 
				
			||||||
  DWARFContextInMemory(object::ObjectFile &);
 | 
					  DWARFContextInMemory(const object::ObjectFile &Obj);
 | 
				
			||||||
  bool isLittleEndian() const override { return IsLittleEndian; }
 | 
					  bool isLittleEndian() const override { return IsLittleEndian; }
 | 
				
			||||||
  uint8_t getAddressSize() const override { return AddressSize; }
 | 
					  uint8_t getAddressSize() const override { return AddressSize; }
 | 
				
			||||||
  const DWARFSection &getInfoSection() override { return InfoSection; }
 | 
					  const DWARFSection &getInfoSection() override { return InfoSection; }
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user