summaryrefslogtreecommitdiff
path: root/tools/lto/LTOModule.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-07-26 02:12:58 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-07-26 02:12:58 +0000
commita5881e3060aee9f82aef3747a97650e5eafe893a (patch)
tree91b295074626e17cb0342c1de0959a5a6c2349b0 /tools/lto/LTOModule.cpp
parent13b9251eb1343eb4c93944f5d6838404c27a7273 (diff)
downloadllvm-a5881e3060aee9f82aef3747a97650e5eafe893a.tar.gz
llvm-a5881e3060aee9f82aef3747a97650e5eafe893a.tar.bz2
llvm-a5881e3060aee9f82aef3747a97650e5eafe893a.tar.xz
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/lto/LTOModule.cpp')
-rw-r--r--tools/lto/LTOModule.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/tools/lto/LTOModule.cpp b/tools/lto/LTOModule.cpp
index a72938a43b..83dda0cdc6 100644
--- a/tools/lto/LTOModule.cpp
+++ b/tools/lto/LTOModule.cpp
@@ -145,9 +145,10 @@ LTOModule* LTOModule::makeLTOModule(MemoryBuffer* buffer,
if ( !m )
return NULL;
// find machine architecture for this module
- const Target* march =
- TargetRegistry::getClosestStaticTargetForModule(*m, errMsg);
-
+ const Target* march = TargetRegistry::lookupTarget(m->getTargetTriple(),
+ /*FallbackToHost=*/true,
+ /*RequireJIT=*/false,
+ errMsg);
if ( march == NULL )
return NULL;