mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
Use const properly so that we dont remove const qualifier from region and MII
by casting. Found with gcc48. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163247 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -44,7 +44,7 @@ void x86DisassemblerDebug(const char *file,
|
||||
dbgs() << file << ":" << line << ": " << s;
|
||||
}
|
||||
|
||||
const char *x86DisassemblerGetInstrName(unsigned Opcode, void *mii) {
|
||||
const char *x86DisassemblerGetInstrName(unsigned Opcode, const void *mii) {
|
||||
const MCInstrInfo *MII = static_cast<const MCInstrInfo *>(mii);
|
||||
return MII->getName(Opcode);
|
||||
}
|
||||
@@ -95,8 +95,8 @@ const EDInstInfo *X86GenericDisassembler::getEDInfo() const {
|
||||
/// be a pointer to a MemoryObject.
|
||||
/// @param byte - A pointer to the byte to be read.
|
||||
/// @param address - The address to be read.
|
||||
static int regionReader(void* arg, uint8_t* byte, uint64_t address) {
|
||||
MemoryObject* region = static_cast<MemoryObject*>(arg);
|
||||
static int regionReader(const void* arg, uint8_t* byte, uint64_t address) {
|
||||
const MemoryObject* region = static_cast<const MemoryObject*>(arg);
|
||||
return region->readByte(address, byte);
|
||||
}
|
||||
|
||||
@@ -135,10 +135,10 @@ X86GenericDisassembler::getInstruction(MCInst &instr,
|
||||
|
||||
int ret = decodeInstruction(&internalInstr,
|
||||
regionReader,
|
||||
(void*)®ion,
|
||||
(const void*)®ion,
|
||||
loggerFn,
|
||||
(void*)&vStream,
|
||||
(void*)MII,
|
||||
(const void*)MII,
|
||||
address,
|
||||
fMode);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user