aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Support
diff options
context:
space:
mode:
authorSebastian Pop <spop@codeaurora.org>2011-11-01 21:32:20 +0000
committerSebastian Pop <spop@codeaurora.org>2011-11-01 21:32:20 +0000
commit0173864d8a87d9243d304fbf91b556e20b5a32fc (patch)
tree664b5b6cf13cc718f8779b8de94d85079c52f5cf /lib/Support
parentde2e0b5e6d5aa7eccf62df17b86c31b39732bf86 (diff)
downloadexternal_llvm-0173864d8a87d9243d304fbf91b556e20b5a32fc.zip
external_llvm-0173864d8a87d9243d304fbf91b556e20b5a32fc.tar.gz
external_llvm-0173864d8a87d9243d304fbf91b556e20b5a32fc.tar.bz2
rename getHostTriple into getDefaultTargetTriple
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143502 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support')
-rw-r--r--lib/Support/CommandLine.cpp2
-rw-r--r--lib/Support/TargetRegistry.cpp2
-rw-r--r--lib/Support/Unix/Host.inc10
-rw-r--r--lib/Support/Windows/Host.inc2
4 files changed, 8 insertions, 8 deletions
diff --git a/lib/Support/CommandLine.cpp b/lib/Support/CommandLine.cpp
index 238adcc..4b43ae9 100644
--- a/lib/Support/CommandLine.cpp
+++ b/lib/Support/CommandLine.cpp
@@ -1369,7 +1369,7 @@ public:
#if (ENABLE_TIMESTAMPS == 1)
<< " Built " << __DATE__ << " (" << __TIME__ << ").\n"
#endif
- << " Host: " << sys::getHostTriple() << '\n'
+ << " Default target: " << sys::getDefaultTargetTriple() << '\n'
<< " Host CPU: " << CPU << '\n';
}
void operator=(bool OptionWasSpecified) {
diff --git a/lib/Support/TargetRegistry.cpp b/lib/Support/TargetRegistry.cpp
index 7497bfe..53c8d84 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::getHostTriple(), Error);
+ const Target *TheTarget = lookupTarget(sys::getDefaultTargetTriple(), Error);
if (TheTarget && !TheTarget->hasJIT()) {
Error = "No JIT compatible target available for this host";
diff --git a/lib/Support/Unix/Host.inc b/lib/Support/Unix/Host.inc
index dc16417..726e2fb 100644
--- a/lib/Support/Unix/Host.inc
+++ b/lib/Support/Unix/Host.inc
@@ -35,11 +35,11 @@ static std::string getOSVersion() {
return info.release;
}
-std::string sys::getHostTriple() {
- StringRef HostTripleString(LLVM_DEFAULT_TARGET_TRIPLE);
- std::pair<StringRef, StringRef> ArchSplit = HostTripleString.split('-');
+std::string sys::getDefaultTargetTriple() {
+ StringRef TargetTripleString(LLVM_DEFAULT_TARGET_TRIPLE);
+ std::pair<StringRef, StringRef> ArchSplit = TargetTripleString.split('-');
- // Normalize the arch, since the host triple may not actually match the host.
+ // Normalize the arch, since the target triple may not actually match the target.
std::string Arch = ArchSplit.first;
std::string Triple(Arch);
@@ -52,7 +52,7 @@ std::string sys::getHostTriple() {
Triple[1] = '3';
// On darwin, we want to update the version to match that of the
- // host.
+ // target.
std::string::size_type DarwinDashIdx = Triple.find("-darwin");
if (DarwinDashIdx != std::string::npos) {
Triple.resize(DarwinDashIdx + strlen("-darwin"));
diff --git a/lib/Support/Windows/Host.inc b/lib/Support/Windows/Host.inc
index 5bbc74e..2e6d6f1 100644
--- a/lib/Support/Windows/Host.inc
+++ b/lib/Support/Windows/Host.inc
@@ -17,6 +17,6 @@
using namespace llvm;
-std::string sys::getHostTriple() {
+std::string sys::getDefaultTargetTriple() {
return LLVM_DEFAULT_TARGET_TRIPLE;
}