mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-12 07:37:34 +00:00
Fixed logic error. Should check Builder for validity before calling SetSession
on it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101563 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a3dfc646b4
commit
af5b0e851e
@ -407,7 +407,6 @@ bool ARMDisassembler::getInstruction(MCInst &MI,
|
||||
});
|
||||
|
||||
ARMBasicMCBuilder *Builder = CreateMCBuilder(Opcode, Format);
|
||||
|
||||
if (!Builder)
|
||||
return false;
|
||||
|
||||
@ -495,11 +494,11 @@ bool ThumbDisassembler::getInstruction(MCInst &MI,
|
||||
});
|
||||
|
||||
ARMBasicMCBuilder *Builder = CreateMCBuilder(Opcode, Format);
|
||||
Builder->SetSession(const_cast<Session *>(&SO));
|
||||
|
||||
if (!Builder)
|
||||
return false;
|
||||
|
||||
Builder->SetSession(const_cast<Session *>(&SO));
|
||||
|
||||
if (!Builder->Build(MI, insn))
|
||||
return false;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user