mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-12 03:32:10 +00:00
Fix apparent build error caused by r138948 on certain versions of GCC with -Werror. Sorry for the inconvenience.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138973 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6bb4e7e8e8
commit
ee06443945
@ -135,12 +135,16 @@ size_t LLVMDisasmInstruction(LLVMDisasmContextRef DCR, uint8_t *Bytes,
|
||||
MCInst Inst;
|
||||
const MCDisassembler *DisAsm = DC->getDisAsm();
|
||||
MCInstPrinter *IP = DC->getIP();
|
||||
if (DisAsm->getInstruction(Inst, Size, MemoryObject, PC,
|
||||
/*REMOVE*/ nulls()) != MCDisassembler::Success) {
|
||||
MCDisassembler::DecodeStatus S;
|
||||
S = DisAsm->getInstruction(Inst, Size, MemoryObject, PC,
|
||||
/*REMOVE*/ nulls());
|
||||
switch (S) {
|
||||
case MCDisassembler::Fail:
|
||||
case MCDisassembler::SoftFail:
|
||||
// FIXME: Do something different for soft failure modes?
|
||||
return 0;
|
||||
}
|
||||
|
||||
case MCDisassembler::Success: {
|
||||
SmallVector<char, 64> InsnStr;
|
||||
raw_svector_ostream OS(InsnStr);
|
||||
IP->printInst(&Inst, OS);
|
||||
@ -153,3 +157,6 @@ size_t LLVMDisasmInstruction(LLVMDisasmContextRef DCR, uint8_t *Bytes,
|
||||
|
||||
return Size;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
@ -239,12 +239,17 @@ EDInst *EDDisassembler::createInst(EDByteReaderCallback byteReader,
|
||||
MCInst* inst = new MCInst;
|
||||
uint64_t byteSize;
|
||||
|
||||
if (Disassembler->getInstruction(*inst, byteSize, memoryObject, address,
|
||||
ErrorStream) != MCDisassembler::Success) {
|
||||
MCDisassembler::DecodeStatus S;
|
||||
S = Disassembler->getInstruction(*inst, byteSize, memoryObject, address,
|
||||
ErrorStream);
|
||||
switch (S) {
|
||||
case MCDisassembler::Fail:
|
||||
case MCDisassembler::SoftFail:
|
||||
// FIXME: Do something different on soft failure mode?
|
||||
delete inst;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
case MCDisassembler::Success: {
|
||||
const llvm::EDInstInfo *thisInstInfo = NULL;
|
||||
|
||||
if (InstInfos) {
|
||||
@ -254,6 +259,9 @@ EDInst *EDDisassembler::createInst(EDByteReaderCallback byteReader,
|
||||
EDInst* sdInst = new EDInst(inst, byteSize, *this, thisInstInfo);
|
||||
return sdInst;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void EDDisassembler::initMaps(const MCRegisterInfo ®isterInfo) {
|
||||
unsigned numRegisters = registerInfo.getNumRegs();
|
||||
|
Loading…
x
Reference in New Issue
Block a user