mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-01 00:33:09 +00:00
Since the DisasmMemoryObject only operates on const data, it now only accepts a const data pointer. This silences a -Wcast-qual warning.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218454 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
733681d3bd
commit
837a7c094b
@ -555,11 +555,11 @@ const char *SymbolizerSymbolLookUp(void *DisInfo, uint64_t ReferenceValue,
|
||||
// generally not linked at address zero.
|
||||
//
|
||||
class DisasmMemoryObject : public MemoryObject {
|
||||
uint8_t *Bytes;
|
||||
const uint8_t *Bytes;
|
||||
uint64_t Size;
|
||||
uint64_t BasePC;
|
||||
public:
|
||||
DisasmMemoryObject(uint8_t *bytes, uint64_t size, uint64_t basePC) :
|
||||
DisasmMemoryObject(const uint8_t *bytes, uint64_t size, uint64_t basePC) :
|
||||
Bytes(bytes), Size(size), BasePC(basePC) {}
|
||||
|
||||
uint64_t getBase() const override { return BasePC; }
|
||||
@ -788,7 +788,7 @@ static void DisassembleInputMachO2(StringRef Filename,
|
||||
Sections[SectIdx].getContents(Bytes);
|
||||
uint64_t SectAddress = 0;
|
||||
Sections[SectIdx].getAddress(SectAddress);
|
||||
DisasmMemoryObject MemoryObject((uint8_t *)Bytes.data(), Bytes.size(),
|
||||
DisasmMemoryObject MemoryObject((const uint8_t *)Bytes.data(), Bytes.size(),
|
||||
SectAddress);
|
||||
bool symbolTableWorked = false;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user