aboutsummaryrefslogtreecommitdiff
path: root/lib/Support/TargetRegistry.cpp
diff options
context:
space:
mode:
authorSebastian Pop <spop@codeaurora.org>2012-01-04 19:47:22 +0000
committerSebastian Pop <spop@codeaurora.org>2012-01-04 19:47:22 +0000
commit8a86887ba3dcf59ddfd1d26bd2af1ac9c6bed76a (patch)
treed063101aa566588fde106548beed730b9023ced8 /lib/Support/TargetRegistry.cpp
parentb0e7af779732c5ff3c054c837a4b04ad6089d0ac (diff)
use getHostTriple instead of getDefaultTargetTriple in getClosestTargetForJIT
Get back getHostTriple. For JIT compilation, use the host triple instead of the default target: this fixes some JIT testcases that used to fail when the compiler has been configured as a cross compiler. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147542 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/TargetRegistry.cpp')
-rw-r--r--lib/Support/TargetRegistry.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Support/TargetRegistry.cpp b/lib/Support/TargetRegistry.cpp
index 53c8d84e7d..7497bfe035 100644
--- a/lib/Support/TargetRegistry.cpp
+++ b/lib/Support/TargetRegistry.cpp
@@ -84,7 +84,7 @@ void TargetRegistry::RegisterTarget(Target &T,
}
const Target *TargetRegistry::getClosestTargetForJIT(std::string &Error) {
- const Target *TheTarget = lookupTarget(sys::getDefaultTargetTriple(), Error);
+ const Target *TheTarget = lookupTarget(sys::getHostTriple(), Error);
if (TheTarget && !TheTarget->hasJIT()) {
Error = "No JIT compatible target available for this host";