[cfe-commits] r66603 - /cfe/trunk/lib/Driver/HostInfo.cpp

Daniel Dunbar daniel at zuster.org
Tue Mar 10 16:50:49 PDT 2009


Author: ddunbar
Date: Tue Mar 10 18:50:49 2009
New Revision: 66603

URL: http://llvm.org/viewvc/llvm-project?rev=66603&view=rev
Log:
Driver: Add host info (add new files).

Added:
    cfe/trunk/lib/Driver/HostInfo.cpp

Added: cfe/trunk/lib/Driver/HostInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/HostInfo.cpp?rev=66603&view=auto

==============================================================================
--- cfe/trunk/lib/Driver/HostInfo.cpp (added)
+++ cfe/trunk/lib/Driver/HostInfo.cpp Tue Mar 10 18:50:49 2009
@@ -0,0 +1,61 @@
+//===--- HostInfo.cpp - Host specific information -----------------------*-===//
+//
+//                     The LLVM Compiler Infrastructure
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+
+#include "clang/Driver/HostInfo.h"
+ 
+using namespace clang::driver;
+
+HostInfo::HostInfo(const char *_Arch, const char *_Platform,
+                   const char *_OS) 
+  : Arch(_Arch), Platform(_Platform), OS(_OS) 
+{
+  
+}
+
+HostInfo::~HostInfo() {
+}
+
+// Darwin Host Info
+
+DarwinHostInfo::DarwinHostInfo(const char *Arch, const char *Platform,
+                               const char *OS) 
+  : HostInfo(Arch, Platform, OS) {
+
+  // FIXME: How to deal with errors?
+  
+  // We can only call 4.2.1 for now.
+  GCCVersion[0] = 4;
+  GCCVersion[1] = 2;
+  GCCVersion[2] = 1;
+}
+
+bool DarwinHostInfo::useDriverDriver() const { 
+  return true;
+}
+
+ToolChain *DarwinHostInfo::getToolChain(const ArgList &Args, 
+                                        const char *ArchName) const {
+  return 0;
+}
+
+// Unknown Host Info
+
+UnknownHostInfo::UnknownHostInfo(const char *Arch, const char *Platform,
+                               const char *OS) 
+  : HostInfo(Arch, Platform, OS) {
+}
+
+bool UnknownHostInfo::useDriverDriver() const { 
+  return false;
+}
+
+ToolChain *UnknownHostInfo::getToolChain(const ArgList &Args, 
+                                         const char *ArchName) const {
+  return 0;
+}





More information about the cfe-commits mailing list