mirror of
https://github.com/llvm/llvm-project.git
synced 2025-05-06 17:36:06 +00:00
llvm-mc: Fix target selection for --disassemble to use GetTarget.
llvm-svn: 98973
This commit is contained in:
parent
c532697372
commit
abf6e3657e
@ -318,13 +318,9 @@ static int AssembleInput(const char *ProgName) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int DisassembleInput(const char *ProgName) {
|
static int DisassembleInput(const char *ProgName) {
|
||||||
std::string Error;
|
const Target *TheTarget = GetTarget(ProgName);
|
||||||
const Target *TheTarget = TargetRegistry::lookupTarget(TripleName, Error);
|
if (!TheTarget)
|
||||||
if (TheTarget == 0) {
|
|
||||||
errs() << ProgName << ": error: unable to get target for '" << TripleName
|
|
||||||
<< "', see --version and --triple.\n";
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
|
||||||
|
|
||||||
std::string ErrorMessage;
|
std::string ErrorMessage;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user