forked from OSchip/llvm-project
[MC] Assume CommentStream is non-null in MCDisassembler::tryAdding*
AArch64/ARM/X86 call the two functions. CommentStream is always initialized.
This commit is contained in:
parent
2b0256e49b
commit
1ea5ce6335
|
@ -27,18 +27,16 @@ bool MCDisassembler::tryAddingSymbolicOperand(MCInst &Inst, int64_t Value,
|
|||
uint64_t Address, bool IsBranch,
|
||||
uint64_t Offset,
|
||||
uint64_t InstSize) const {
|
||||
raw_ostream &cStream = CommentStream ? *CommentStream : nulls();
|
||||
if (Symbolizer)
|
||||
return Symbolizer->tryAddingSymbolicOperand(Inst, cStream, Value, Address,
|
||||
IsBranch, Offset, InstSize);
|
||||
return Symbolizer->tryAddingSymbolicOperand(
|
||||
Inst, *CommentStream, Value, Address, IsBranch, Offset, InstSize);
|
||||
return false;
|
||||
}
|
||||
|
||||
void MCDisassembler::tryAddingPcLoadReferenceComment(int64_t Value,
|
||||
uint64_t Address) const {
|
||||
raw_ostream &cStream = CommentStream ? *CommentStream : nulls();
|
||||
if (Symbolizer)
|
||||
Symbolizer->tryAddingPcLoadReferenceComment(cStream, Value, Address);
|
||||
Symbolizer->tryAddingPcLoadReferenceComment(*CommentStream, Value, Address);
|
||||
}
|
||||
|
||||
void MCDisassembler::setSymbolizer(std::unique_ptr<MCSymbolizer> Symzer) {
|
||||
|
|
Loading…
Reference in New Issue