aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/HostInfo.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-03-10 23:50:49 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-03-10 23:50:49 +0000
commite399564a230846b3a3044855a2b11c4264d2d776 (patch)
tree05319ffd21b28b2a02140ce5b150797a3176c562 /lib/Driver/HostInfo.cpp
parent275a369f003f25bd22c00c1c0fc0251c7208caf4 (diff)
Driver: Add host info (add new files).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66603 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/HostInfo.cpp')
-rw-r--r--lib/Driver/HostInfo.cpp61
1 files changed, 61 insertions, 0 deletions
diff --git a/lib/Driver/HostInfo.cpp b/lib/Driver/HostInfo.cpp
new file mode 100644
index 0000000000..3ae0c38d39
--- /dev/null
+++ b/lib/Driver/HostInfo.cpp
@@ -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;
+}