mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-13 20:32:21 +00:00
34c5b5b952
There were still some disassembler bits in lib/MC, but their use of Object was only visible in the includes they used, not in the symbols. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213808 91177308-0d34-0410-b5e6-96231b3b80d8
40 lines
1.5 KiB
C++
40 lines
1.5 KiB
C++
//===-- MCDisassembler.cpp - Disassembler interface -----------------------===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file is distributed under the University of Illinois Open Source
|
|
// License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "llvm/MC/MCDisassembler.h"
|
|
#include "llvm/MC/MCExternalSymbolizer.h"
|
|
#include "llvm/Support/raw_ostream.h"
|
|
|
|
using namespace llvm;
|
|
|
|
MCDisassembler::~MCDisassembler() {
|
|
}
|
|
|
|
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 false;
|
|
}
|
|
|
|
void MCDisassembler::tryAddingPcLoadReferenceComment(int64_t Value,
|
|
uint64_t Address) const {
|
|
raw_ostream &cStream = CommentStream ? *CommentStream : nulls();
|
|
if (Symbolizer)
|
|
Symbolizer->tryAddingPcLoadReferenceComment(cStream, Value, Address);
|
|
}
|
|
|
|
void MCDisassembler::setSymbolizer(std::unique_ptr<MCSymbolizer> Symzer) {
|
|
Symbolizer = std::move(Symzer);
|
|
}
|