]> granicus.if.org Git - clang/commitdiff
rename DefaultHostTriple into DefaultTargetTriple
authorSebastian Pop <spop@codeaurora.org>
Fri, 13 Jan 2012 20:36:46 +0000 (20:36 +0000)
committerSebastian Pop <spop@codeaurora.org>
Fri, 13 Jan 2012 20:36:46 +0000 (20:36 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148137 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Driver/Driver.h
lib/Driver/Driver.cpp
lib/Driver/ToolChains.cpp

index 6fdf6fcfad649fad26ee0f2a87d297c138d2b826..845e527067d23a8292989e0b37b1a07d38beacbf 100644 (file)
@@ -86,8 +86,8 @@ public:
   /// If the standard library is used
   bool UseStdLib;
 
-  /// Default host triple.
-  std::string DefaultHostTriple;
+  /// Default target triple.
+  std::string DefaultTargetTriple;
 
   /// Default name for linked images (e.g., "a.out").
   std::string DefaultImageName;
@@ -187,7 +187,7 @@ private:
 
 public:
   Driver(StringRef _ClangExecutable,
-         StringRef _DefaultHostTriple,
+         StringRef _DefaultTargetTriple,
          StringRef _DefaultImageName,
          bool IsProduction,
          DiagnosticsEngine &_Diags);
index ec344e0c788455d05c685abff12564444ee80191..ce4a89e724dca69363ecd321092db79bfa53d81b 100644 (file)
@@ -47,13 +47,13 @@ using namespace clang::driver;
 using namespace clang;
 
 Driver::Driver(StringRef ClangExecutable,
-               StringRef DefaultHostTriple,
+               StringRef DefaultTargetTriple,
                StringRef DefaultImageName,
                bool IsProduction,
                DiagnosticsEngine &Diags)
   : Opts(createDriverOptTable()), Diags(Diags),
     ClangExecutable(ClangExecutable), UseStdLib(true),
-    DefaultHostTriple(DefaultHostTriple), DefaultImageName(DefaultImageName),
+    DefaultTargetTriple(DefaultTargetTriple), DefaultImageName(DefaultImageName),
     DriverTitle("clang \"gcc-compatible\" driver"),
     Host(0),
     CCPrintOptionsFilename(0), CCPrintHeadersFilename(0),
@@ -306,7 +306,7 @@ Compilation *Driver::BuildCompilation(ArrayRef<const char *> ArgList) {
   // FIXME: We shouldn't overwrite the default host triple here, but we have
   // nowhere else to put this currently.
   if (const Arg *A = Args->getLastArg(options::OPT_ccc_host_triple))
-    DefaultHostTriple = A->getValue(*Args);
+    DefaultTargetTriple = A->getValue(*Args);
   if (const Arg *A = Args->getLastArg(options::OPT_ccc_install_dir))
     Dir = InstalledDir = A->getValue(*Args);
   for (arg_iterator it = Args->filtered_begin(options::OPT_B),
@@ -320,7 +320,7 @@ Compilation *Driver::BuildCompilation(ArrayRef<const char *> ArgList) {
   if (Args->hasArg(options::OPT_nostdlib))
     UseStdLib = false;
 
-  Host = GetHostInfo(DefaultHostTriple.c_str());
+  Host = GetHostInfo(DefaultTargetTriple.c_str());
 
   // Perform the default argument translations.
   DerivedArgList *TranslatedArgs = TranslateInputArgs(*Args);
@@ -1507,7 +1507,7 @@ static bool isPathExecutable(llvm::sys::Path &P, bool WantFile) {
 
 std::string Driver::GetProgramPath(const char *Name, const ToolChain &TC,
                                    bool WantFile) const {
-  std::string TargetSpecificExecutable(DefaultHostTriple + "-" + Name);
+  std::string TargetSpecificExecutable(DefaultTargetTriple + "-" + Name);
   // Respect a limited subset of the '-Bprefix' functionality in GCC by
   // attempting to use this prefix when lokup up program paths.
   for (Driver::prefix_list::const_iterator it = PrefixDirs.begin(),
index 0ae91a8d7e450de407a0d75d9a4627544020603c..5a1cd16cf786bc5e34f6a3cfc4b37c338c2b8064 100644 (file)
@@ -1096,7 +1096,7 @@ bool Generic_GCC::GCCVersion::operator<(const GCCVersion &RHS) const {
 /// Once constructed, a GCCInstallation is esentially immutable.
 Generic_GCC::GCCInstallationDetector::GCCInstallationDetector(const Driver &D)
   : IsValid(false),
-    GccTriple(D.DefaultHostTriple) {
+    GccTriple(D.DefaultTargetTriple) {
   // FIXME: Using CXX_INCLUDE_ROOT is here is a bit of a hack, but
   // avoids adding yet another option to configure/cmake.
   // It would probably be cleaner to break it in two variables
@@ -1134,7 +1134,7 @@ Generic_GCC::GCCInstallationDetector::GCCInstallationDetector(const Driver &D)
 
   // Always include the default host triple as the final fallback if no
   // specific triple is detected.
-  CandidateTriples.push_back(D.DefaultHostTriple);
+  CandidateTriples.push_back(D.DefaultTargetTriple);
 
   // Compute the set of prefixes for our search.
   SmallVector<std::string, 8> Prefixes(D.PrefixDirs.begin(),
@@ -1541,12 +1541,12 @@ FreeBSD::FreeBSD(const HostInfo &Host, const llvm::Triple& Triple)
   // Determine if we are compiling 32-bit code on an x86_64 platform.
   bool Lib32 = false;
   if (Triple.getArch() == llvm::Triple::x86 &&
-      llvm::Triple(getDriver().DefaultHostTriple).getArch() ==
+      llvm::Triple(getDriver().DefaultTargetTriple).getArch() ==
         llvm::Triple::x86_64)
     Lib32 = true;
 
   if (Triple.getArch() == llvm::Triple::ppc &&
-      llvm::Triple(getDriver().DefaultHostTriple).getArch() ==
+      llvm::Triple(getDriver().DefaultTargetTriple).getArch() ==
         llvm::Triple::ppc64)
     Lib32 = true;
 
@@ -1892,7 +1892,7 @@ static std::string getMultiarchTriple(const llvm::Triple TargetTriple,
 Linux::Linux(const HostInfo &Host, const llvm::Triple &Triple)
   : Generic_ELF(Host, Triple) {
   llvm::Triple::ArchType Arch =
-    llvm::Triple(getDriver().DefaultHostTriple).getArch();
+    llvm::Triple(getDriver().DefaultTargetTriple).getArch();
   const std::string &SysRoot = getDriver().SysRoot;
 
   // OpenSuse stores the linker with the compiler, add that to the search
@@ -2184,7 +2184,7 @@ void Linux::AddClangCXXStdlibIncludeArgs(const ArgList &DriverArgs,
   // only support the suffix-based bi-arch-like header scheme for host/target
   // mismatches of just bit width.
   llvm::Triple::ArchType HostArch =
-    llvm::Triple(getDriver().DefaultHostTriple).getArch();
+    llvm::Triple(getDriver().DefaultTargetTriple).getArch();
   llvm::Triple::ArchType TargetArch = TargetTriple.getArch();
   StringRef Suffix;
   if ((HostArch == llvm::Triple::x86 && TargetArch == llvm::Triple::x86_64) ||