rename LLVM_HOSTTRIPLE into LLVM_DEFAULT_TARGET_TRIPLE



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143501 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/autoconf/configure.ac b/autoconf/configure.ac
index 7586ba7..6e9d848 100644
--- a/autoconf/configure.ac
+++ b/autoconf/configure.ac
@@ -1453,8 +1453,8 @@
                    [Installation directory for man pages])
 AC_DEFINE_UNQUOTED(LLVM_CONFIGTIME, "$LLVM_CONFIGTIME",
                    [Time at which LLVM was configured])
-AC_DEFINE_UNQUOTED(LLVM_HOSTTRIPLE, "$target",
-                   [Host triple we were built on])
+AC_DEFINE_UNQUOTED(LLVM_DEFAULT_TARGET_TRIPLE, "$target",
+                   [Target triple LLVM will generate code for by default])
 
 # Determine which bindings to build.
 if test "$BINDINGS_TO_BUILD" = auto ; then
diff --git a/cmake/config-ix.cmake b/cmake/config-ix.cmake
index 18549a3..62699fa 100755
--- a/cmake/config-ix.cmake
+++ b/cmake/config-ix.cmake
@@ -286,15 +286,14 @@
 check_cxx_compiler_flag("-Wno-variadic-macros" SUPPORTS_NO_VARIADIC_MACROS_FLAG)
 
 include(GetTargetTriple)
-get_target_triple(LLVM_HOSTTRIPLE)
+get_target_triple(LLVM_DEFAULT_TARGET_TRIPLE)
 
-# FIXME: We don't distinguish the target and the host. :(
-set(TARGET_TRIPLE "${LLVM_HOSTTRIPLE}")
+set(TARGET_TRIPLE "${LLVM_DEFAULT_TARGET_TRIPLE}")
 
 # Determine the native architecture.
 string(TOLOWER "${LLVM_TARGET_ARCH}" LLVM_NATIVE_ARCH)
 if( LLVM_NATIVE_ARCH STREQUAL "host" )
-  string(REGEX MATCH "^[^-]*" LLVM_NATIVE_ARCH ${LLVM_HOSTTRIPLE})
+  string(REGEX MATCH "^[^-]*" LLVM_NATIVE_ARCH ${LLVM_DEFAULT_TARGET_TRIPLE})
 endif ()
 
 if (LLVM_NATIVE_ARCH MATCHES "i[2-6]86")
diff --git a/configure b/configure
index a10276b..ae6be9d 100755
--- a/configure
+++ b/configure
@@ -20865,7 +20865,7 @@
 
 
 cat >>confdefs.h <<_ACEOF
-#define LLVM_HOSTTRIPLE "$target"
+#define LLVM_DEFAULT_TARGET_TRIPLE "$target"
 _ACEOF
 
 
diff --git a/include/llvm/Config/config.h.cmake b/include/llvm/Config/config.h.cmake
index e44d429..69e3eef 100644
--- a/include/llvm/Config/config.h.cmake
+++ b/include/llvm/Config/config.h.cmake
@@ -555,7 +555,7 @@
 #cmakedefine01 LLVM_HAS_ATOMICS
 
 /* Host triple we were built on */
-#cmakedefine LLVM_HOSTTRIPLE "${LLVM_HOSTTRIPLE}"
+#cmakedefine LLVM_DEFAULT_TARGET_TRIPLE "${LLVM_DEFAULT_TARGET_TRIPLE}"
 
 /* Installation directory for include files */
 #cmakedefine LLVM_INCLUDEDIR "${LLVM_INCLUDEDIR}"
diff --git a/include/llvm/Config/config.h.in b/include/llvm/Config/config.h.in
index 3670de5..813c6eb 100644
--- a/include/llvm/Config/config.h.in
+++ b/include/llvm/Config/config.h.in
@@ -543,6 +543,9 @@
 /* Installation directory for data files */
 #undef LLVM_DATADIR
 
+/* Target triple LLVM will generate code for by default */
+#undef LLVM_DEFAULT_TARGET_TRIPLE
+
 /* Installation directory for documentation */
 #undef LLVM_DOCSDIR
 
@@ -552,9 +555,6 @@
 /* Has gcc/MSVC atomic intrinsics */
 #undef LLVM_HAS_ATOMICS
 
-/* Host triple we were built on */
-#undef LLVM_HOSTTRIPLE
-
 /* Installation directory for include files */
 #undef LLVM_INCLUDEDIR
 
diff --git a/include/llvm/Config/llvm-config.h.cmake b/include/llvm/Config/llvm-config.h.cmake
index 4147fd1..8383886 100644
--- a/include/llvm/Config/llvm-config.h.cmake
+++ b/include/llvm/Config/llvm-config.h.cmake
@@ -35,7 +35,7 @@
 #cmakedefine01 LLVM_HAS_ATOMICS
 
 /* Host triple we were built on */
-#cmakedefine LLVM_HOSTTRIPLE "${LLVM_HOSTTRIPLE}"
+#cmakedefine LLVM_DEFAULT_TARGET_TRIPLE "${LLVM_DEFAULT_TARGET_TRIPLE}"
 
 /* Installation directory for include files */
 #cmakedefine LLVM_INCLUDEDIR "${LLVM_INCLUDEDIR}"
diff --git a/include/llvm/Config/llvm-config.h.in b/include/llvm/Config/llvm-config.h.in
index b2257f3..1dd7ed6 100644
--- a/include/llvm/Config/llvm-config.h.in
+++ b/include/llvm/Config/llvm-config.h.in
@@ -35,7 +35,7 @@
 #undef LLVM_HAS_ATOMICS
 
 /* Host triple we were built on */
-#undef LLVM_HOSTTRIPLE
+#undef LLVM_DEFAULT_TARGET_TRIPLE
 
 /* Installation directory for include files */
 #undef LLVM_INCLUDEDIR
diff --git a/lib/Support/Unix/Host.inc b/lib/Support/Unix/Host.inc
index dda3ce2..dc16417 100644
--- a/lib/Support/Unix/Host.inc
+++ b/lib/Support/Unix/Host.inc
@@ -36,10 +36,7 @@
 }
 
 std::string sys::getHostTriple() {
-  // FIXME: Derive directly instead of relying on the autoconf generated
-  // variable.
-
-  StringRef HostTripleString(LLVM_HOSTTRIPLE);
+  StringRef HostTripleString(LLVM_DEFAULT_TARGET_TRIPLE);
   std::pair<StringRef, StringRef> ArchSplit = HostTripleString.split('-');
 
   // Normalize the arch, since the host triple may not actually match the host.
diff --git a/lib/Support/Windows/Host.inc b/lib/Support/Windows/Host.inc
index 733830e..5bbc74e 100644
--- a/lib/Support/Windows/Host.inc
+++ b/lib/Support/Windows/Host.inc
@@ -18,6 +18,5 @@
 using namespace llvm;
 
 std::string sys::getHostTriple() {
-  // FIXME: Adapt to running version.
-  return LLVM_HOSTTRIPLE;
+  return LLVM_DEFAULT_TARGET_TRIPLE;
 }
diff --git a/projects/sample/autoconf/configure.ac b/projects/sample/autoconf/configure.ac
index a5d786d..ab15892 100644
--- a/projects/sample/autoconf/configure.ac
+++ b/projects/sample/autoconf/configure.ac
@@ -1386,8 +1386,8 @@
                    [Installation directory for man pages])
 AC_DEFINE_UNQUOTED(LLVM_CONFIGTIME, "$LLVM_CONFIGTIME",
                    [Time at which LLVM was configured])
-AC_DEFINE_UNQUOTED(LLVM_HOSTTRIPLE, "$target",
-                   [Host triple we were built on])
+AC_DEFINE_UNQUOTED(LLVM_DEFAULT_TARGET_TRIPLE, "$target",
+                   [Target triple LLVM will generate code for by default])
 
 # Determine which bindings to build.
 if test "$BINDINGS_TO_BUILD" = auto ; then
diff --git a/projects/sample/configure b/projects/sample/configure
index 1045b5d..dd4305d 100755
--- a/projects/sample/configure
+++ b/projects/sample/configure
@@ -20815,7 +20815,7 @@
 
 
 cat >>confdefs.h <<_ACEOF
-#define LLVM_HOSTTRIPLE "$target"
+#define LLVM_DEFAULT_TARGET_TRIPLE "$target"
 _ACEOF