diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-07-26 02:12:58 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-07-26 02:12:58 +0000 |
commit | a5881e3060aee9f82aef3747a97650e5eafe893a (patch) | |
tree | 91b295074626e17cb0342c1de0959a5a6c2349b0 /tools/llvm-mc/llvm-mc.cpp | |
parent | 13b9251eb1343eb4c93944f5d6838404c27a7273 (diff) |
Add TargetRegistry::lookupTarget.
- This is a simplified mechanism which just looks up a target based on the
target triple, with a few additional flags.
- Remove getClosestStaticTargetForModule, the moral equivalent is now:
lookupTarget(Mod->getTargetTriple, true, false, ...);
- This no longer does the fuzzy matching with target data (based on endianness
and pointer width) that getClosestStaticTargetForModule was doing, but this
was deemed unnecessary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77111 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-mc/llvm-mc.cpp')
-rw-r--r-- | tools/llvm-mc/llvm-mc.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/llvm-mc/llvm-mc.cpp b/tools/llvm-mc/llvm-mc.cpp index ffc9b559f0..5212ab1936 100644 --- a/tools/llvm-mc/llvm-mc.cpp +++ b/tools/llvm-mc/llvm-mc.cpp @@ -147,7 +147,10 @@ static int AssembleInput(const char *ProgName) { // Get the target specific parser. std::string Error; const Target *TheTarget = - TargetRegistry::getClosestStaticTargetForTriple(Triple, Error); + TargetRegistry::lookupTarget(Triple, + /*FallbackToHost=*/true, + /*RequireJIT=*/false, + Error); if (TheTarget == 0) { errs() << ProgName << ": error: unable to get target for '" << Triple << "', see --version and --triple.\n"; |