summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/CBackend
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
commit47d679151b4bd709e9818313117524f35c2ceefd (patch)
tree34c6e2c1e7e26d1dcaddcd292e625787b229b3e6 /llvm/lib/Target/CBackend
parent3092b822552965efa5c13103d1ed5bce8774682b (diff)
downloadbcm5719-llvm-47d679151b4bd709e9818313117524f35c2ceefd.tar.gz
bcm5719-llvm-47d679151b4bd709e9818313117524f35c2ceefd.zip
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. llvm-svn: 77111
Diffstat (limited to 'llvm/lib/Target/CBackend')
-rw-r--r--llvm/lib/Target/CBackend/CBackend.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/Target/CBackend/CBackend.cpp b/llvm/lib/Target/CBackend/CBackend.cpp
index c2681e4f505..d110684c472 100644
--- a/llvm/lib/Target/CBackend/CBackend.cpp
+++ b/llvm/lib/Target/CBackend/CBackend.cpp
@@ -3185,7 +3185,10 @@ std::string CWriter::InterpretASMConstraint(InlineAsm::ConstraintInfo& c) {
if (!TAsm) {
std::string E;
const Target *Match =
- TargetRegistry::getClosestStaticTargetForModule(*TheModule, E);
+ TargetRegistry::lookupTarget(TheModule->getTargetTriple(),
+ /*FallbackToHost=*/true,
+ /*RequireJIT=*/false,
+ E);
if (Match) {
// Per platform Target Machines don't exist, so create it;
// this must be done only once.
OpenPOWER on IntegriCloud