mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-03 13:31:05 +00:00
Disassembler doesn't need TargetMachine anymore.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@134920 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
9bcc399f1c
commit
c08936de0a
@ -415,23 +415,6 @@ static int DisassembleInput(const char *ProgName, bool Enhanced) {
|
|||||||
Res =
|
Res =
|
||||||
Disassembler::disassembleEnhanced(TripleName, *Buffer.take(), Out->os());
|
Disassembler::disassembleEnhanced(TripleName, *Buffer.take(), Out->os());
|
||||||
} else {
|
} else {
|
||||||
// Package up features to be passed to target/subtarget
|
|
||||||
std::string FeaturesStr;
|
|
||||||
|
|
||||||
// FIXME: We shouldn't need to do this (and link in codegen).
|
|
||||||
// When we split this out, we should do it in a way that makes
|
|
||||||
// it straightforward to switch subtargets on the fly (.e.g,
|
|
||||||
// the .cpu and .code16 directives).
|
|
||||||
OwningPtr<TargetMachine> TM(TheTarget->createTargetMachine(TripleName,
|
|
||||||
MCPU,
|
|
||||||
FeaturesStr));
|
|
||||||
|
|
||||||
if (!TM) {
|
|
||||||
errs() << ProgName << ": error: could not create target for triple '"
|
|
||||||
<< TripleName << "'.\n";
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
Res = Disassembler::disassemble(*TheTarget, TripleName,
|
Res = Disassembler::disassemble(*TheTarget, TripleName,
|
||||||
*Buffer.take(), Out->os());
|
*Buffer.take(), Out->os());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user