Daniel Dunbar | e399564 | 2009-03-10 23:50:49 +0000 | [diff] [blame] | 1 | //===--- HostInfo.cpp - Host specific information -----------------------*-===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | |
| 10 | #include "clang/Driver/HostInfo.h" |
Daniel Dunbar | 1fd6c4b | 2009-03-17 19:00:50 +0000 | [diff] [blame] | 11 | |
| 12 | #include "clang/Driver/Arg.h" |
| 13 | #include "clang/Driver/ArgList.h" |
Daniel Dunbar | fc6a899 | 2009-03-20 18:21:51 +0000 | [diff] [blame] | 14 | #include "clang/Driver/Driver.h" |
| 15 | #include "clang/Driver/DriverDiagnostic.h" |
Daniel Dunbar | 1fd6c4b | 2009-03-17 19:00:50 +0000 | [diff] [blame] | 16 | #include "clang/Driver/Option.h" |
| 17 | #include "clang/Driver/Options.h" |
| 18 | |
| 19 | #include "llvm/ADT/StringMap.h" |
| 20 | #include "llvm/Support/Compiler.h" |
| 21 | |
Daniel Dunbar | 83b08eb | 2009-03-17 21:38:00 +0000 | [diff] [blame] | 22 | #include "ToolChains.h" |
| 23 | |
Daniel Dunbar | 1fd6c4b | 2009-03-17 19:00:50 +0000 | [diff] [blame] | 24 | #include <cassert> |
Daniel Dunbar | fe8aa47 | 2009-09-08 23:37:08 +0000 | [diff] [blame] | 25 | |
Daniel Dunbar | e399564 | 2009-03-10 23:50:49 +0000 | [diff] [blame] | 26 | using namespace clang::driver; |
| 27 | |
Daniel Dunbar | cb8ab23 | 2009-05-22 02:53:45 +0000 | [diff] [blame] | 28 | HostInfo::HostInfo(const Driver &D, const llvm::Triple &_Triple) |
Mike Stump | 1eb4433 | 2009-09-09 15:08:12 +0000 | [diff] [blame] | 29 | : TheDriver(D), Triple(_Triple) { |
Daniel Dunbar | e399564 | 2009-03-10 23:50:49 +0000 | [diff] [blame] | 30 | } |
| 31 | |
| 32 | HostInfo::~HostInfo() { |
| 33 | } |
| 34 | |
Chris Lattner | aae82f1 | 2009-03-17 22:24:01 +0000 | [diff] [blame] | 35 | namespace { |
Daniel Dunbar | 1fd6c4b | 2009-03-17 19:00:50 +0000 | [diff] [blame] | 36 | |
Daniel Dunbar | e399564 | 2009-03-10 23:50:49 +0000 | [diff] [blame] | 37 | // Darwin Host Info |
| 38 | |
Daniel Dunbar | 1fd6c4b | 2009-03-17 19:00:50 +0000 | [diff] [blame] | 39 | /// DarwinHostInfo - Darwin host information implementation. |
| 40 | class DarwinHostInfo : public HostInfo { |
| 41 | /// Darwin version of host. |
| 42 | unsigned DarwinVersion[3]; |
| 43 | |
| 44 | /// GCC version to use on this host. |
Ted Kremenek | 55bac53 | 2009-10-07 03:21:11 +0000 | [diff] [blame] | 45 | unsigned GCCVersion[3]; |
Daniel Dunbar | 1fd6c4b | 2009-03-17 19:00:50 +0000 | [diff] [blame] | 46 | |
| 47 | /// Cache of tool chains we have created. |
Daniel Dunbar | 7ef7f13 | 2009-09-08 23:37:36 +0000 | [diff] [blame] | 48 | mutable llvm::DenseMap<unsigned, ToolChain*> ToolChains; |
Daniel Dunbar | 1fd6c4b | 2009-03-17 19:00:50 +0000 | [diff] [blame] | 49 | |
| 50 | public: |
Daniel Dunbar | cb8ab23 | 2009-05-22 02:53:45 +0000 | [diff] [blame] | 51 | DarwinHostInfo(const Driver &D, const llvm::Triple &Triple); |
Daniel Dunbar | 7e4534d | 2009-03-18 01:09:40 +0000 | [diff] [blame] | 52 | ~DarwinHostInfo(); |
Daniel Dunbar | 1fd6c4b | 2009-03-17 19:00:50 +0000 | [diff] [blame] | 53 | |
| 54 | virtual bool useDriverDriver() const; |
| 55 | |
Daniel Dunbar | e33bea4 | 2009-03-20 23:39:23 +0000 | [diff] [blame] | 56 | virtual types::ID lookupTypeForExtension(const char *Ext) const { |
| 57 | types::ID Ty = types::lookupTypeForExtension(Ext); |
| 58 | |
| 59 | // Darwin always preprocesses assembly files (unless -x is used |
| 60 | // explicitly). |
| 61 | if (Ty == types::TY_PP_Asm) |
| 62 | return types::TY_Asm; |
| 63 | |
| 64 | return Ty; |
| 65 | } |
| 66 | |
Daniel Dunbar | d7502d0 | 2009-09-08 23:37:19 +0000 | [diff] [blame] | 67 | virtual ToolChain *CreateToolChain(const ArgList &Args, |
| 68 | const char *ArchName) const; |
Daniel Dunbar | 1fd6c4b | 2009-03-17 19:00:50 +0000 | [diff] [blame] | 69 | }; |
| 70 | |
Daniel Dunbar | cb8ab23 | 2009-05-22 02:53:45 +0000 | [diff] [blame] | 71 | DarwinHostInfo::DarwinHostInfo(const Driver &D, const llvm::Triple& Triple) |
| 72 | : HostInfo(D, Triple) { |
Daniel Dunbar | fe8aa47 | 2009-09-08 23:37:08 +0000 | [diff] [blame] | 73 | |
Daniel Dunbar | 7ef7f13 | 2009-09-08 23:37:36 +0000 | [diff] [blame] | 74 | assert(Triple.getArch() != llvm::Triple::UnknownArch && "Invalid arch!"); |
Daniel Dunbar | fc6a899 | 2009-03-20 18:21:51 +0000 | [diff] [blame] | 75 | assert(memcmp(&getOSName()[0], "darwin", 6) == 0 && |
| 76 | "Unknown Darwin platform."); |
Daniel Dunbar | d73fe9b | 2009-03-26 15:58:36 +0000 | [diff] [blame] | 77 | bool HadExtra; |
Daniel Dunbar | fe8aa47 | 2009-09-08 23:37:08 +0000 | [diff] [blame] | 78 | if (!Driver::GetReleaseVersion(&getOSName()[6], |
| 79 | DarwinVersion[0], DarwinVersion[1], |
Daniel Dunbar | 7ef7f13 | 2009-09-08 23:37:36 +0000 | [diff] [blame] | 80 | DarwinVersion[2], HadExtra)) |
| 81 | D.Diag(clang::diag::err_drv_invalid_darwin_version) << getOSName(); |
Daniel Dunbar | fe8aa47 | 2009-09-08 23:37:08 +0000 | [diff] [blame] | 82 | |
Daniel Dunbar | e399564 | 2009-03-10 23:50:49 +0000 | [diff] [blame] | 83 | // We can only call 4.2.1 for now. |
| 84 | GCCVersion[0] = 4; |
| 85 | GCCVersion[1] = 2; |
| 86 | GCCVersion[2] = 1; |
| 87 | } |
| 88 | |
Daniel Dunbar | 7e4534d | 2009-03-18 01:09:40 +0000 | [diff] [blame] | 89 | DarwinHostInfo::~DarwinHostInfo() { |
Daniel Dunbar | 7ef7f13 | 2009-09-08 23:37:36 +0000 | [diff] [blame] | 90 | for (llvm::DenseMap<unsigned, ToolChain*>::iterator |
Daniel Dunbar | 7e4534d | 2009-03-18 01:09:40 +0000 | [diff] [blame] | 91 | it = ToolChains.begin(), ie = ToolChains.end(); it != ie; ++it) |
| 92 | delete it->second; |
| 93 | } |
| 94 | |
Daniel Dunbar | fe8aa47 | 2009-09-08 23:37:08 +0000 | [diff] [blame] | 95 | bool DarwinHostInfo::useDriverDriver() const { |
Daniel Dunbar | e399564 | 2009-03-10 23:50:49 +0000 | [diff] [blame] | 96 | return true; |
| 97 | } |
| 98 | |
Daniel Dunbar | d7502d0 | 2009-09-08 23:37:19 +0000 | [diff] [blame] | 99 | ToolChain *DarwinHostInfo::CreateToolChain(const ArgList &Args, |
| 100 | const char *ArchName) const { |
Daniel Dunbar | 7ef7f13 | 2009-09-08 23:37:36 +0000 | [diff] [blame] | 101 | llvm::Triple::ArchType Arch; |
| 102 | |
Daniel Dunbar | 1fd6c4b | 2009-03-17 19:00:50 +0000 | [diff] [blame] | 103 | if (!ArchName) { |
Daniel Dunbar | f2edbf3 | 2009-06-16 21:39:33 +0000 | [diff] [blame] | 104 | // If we aren't looking for a specific arch, infer the default architecture |
| 105 | // based on -arch and -m32/-m64 command line options. |
| 106 | if (Arg *A = Args.getLastArg(options::OPT_arch)) { |
| 107 | // The gcc driver behavior with multiple -arch flags wasn't consistent for |
| 108 | // things which rely on a default architecture. We just use the last -arch |
Daniel Dunbar | 2603137 | 2010-01-27 00:56:25 +0000 | [diff] [blame] | 109 | // to find the default tool chain (assuming it is valid). |
Daniel Dunbar | 7ef7f13 | 2009-09-08 23:37:36 +0000 | [diff] [blame] | 110 | Arch = llvm::Triple::getArchTypeForDarwinArchName(A->getValue(Args)); |
Daniel Dunbar | fe8aa47 | 2009-09-08 23:37:08 +0000 | [diff] [blame] | 111 | |
Daniel Dunbar | 7ef7f13 | 2009-09-08 23:37:36 +0000 | [diff] [blame] | 112 | // If it was invalid just use the host, we will reject this command line |
| 113 | // later. |
| 114 | if (Arch == llvm::Triple::UnknownArch) |
| 115 | Arch = getTriple().getArch(); |
Daniel Dunbar | f2edbf3 | 2009-06-16 21:39:33 +0000 | [diff] [blame] | 116 | } else { |
| 117 | // Otherwise default to the arch of the host. |
Daniel Dunbar | 7ef7f13 | 2009-09-08 23:37:36 +0000 | [diff] [blame] | 118 | Arch = getTriple().getArch(); |
Daniel Dunbar | f2edbf3 | 2009-06-16 21:39:33 +0000 | [diff] [blame] | 119 | } |
Daniel Dunbar | fe8aa47 | 2009-09-08 23:37:08 +0000 | [diff] [blame] | 120 | |
Daniel Dunbar | f2edbf3 | 2009-06-16 21:39:33 +0000 | [diff] [blame] | 121 | // Honor -m32 and -m64 when finding the default tool chain. |
Daniel Dunbar | 7ef7f13 | 2009-09-08 23:37:36 +0000 | [diff] [blame] | 122 | // |
| 123 | // FIXME: Should this information be in llvm::Triple? |
Daniel Dunbar | 1fd6c4b | 2009-03-17 19:00:50 +0000 | [diff] [blame] | 124 | if (Arg *A = Args.getLastArg(options::OPT_m32, options::OPT_m64)) { |
Daniel Dunbar | b827a05 | 2009-11-19 03:26:40 +0000 | [diff] [blame] | 125 | if (A->getOption().matches(options::OPT_m32)) { |
Daniel Dunbar | 7ef7f13 | 2009-09-08 23:37:36 +0000 | [diff] [blame] | 126 | if (Arch == llvm::Triple::x86_64) |
| 127 | Arch = llvm::Triple::x86; |
| 128 | if (Arch == llvm::Triple::ppc64) |
| 129 | Arch = llvm::Triple::ppc; |
| 130 | } else { |
| 131 | if (Arch == llvm::Triple::x86) |
| 132 | Arch = llvm::Triple::x86_64; |
| 133 | if (Arch == llvm::Triple::ppc) |
| 134 | Arch = llvm::Triple::ppc64; |
Daniel Dunbar | 1fd6c4b | 2009-03-17 19:00:50 +0000 | [diff] [blame] | 135 | } |
Daniel Dunbar | fe8aa47 | 2009-09-08 23:37:08 +0000 | [diff] [blame] | 136 | } |
Daniel Dunbar | 7ef7f13 | 2009-09-08 23:37:36 +0000 | [diff] [blame] | 137 | } else |
| 138 | Arch = llvm::Triple::getArchTypeForDarwinArchName(ArchName); |
Daniel Dunbar | 1fd6c4b | 2009-03-17 19:00:50 +0000 | [diff] [blame] | 139 | |
Daniel Dunbar | 7ef7f13 | 2009-09-08 23:37:36 +0000 | [diff] [blame] | 140 | assert(Arch != llvm::Triple::UnknownArch && "Unexpected arch!"); |
| 141 | ToolChain *&TC = ToolChains[Arch]; |
Daniel Dunbar | 1fd6c4b | 2009-03-17 19:00:50 +0000 | [diff] [blame] | 142 | if (!TC) { |
Daniel Dunbar | cb8ab23 | 2009-05-22 02:53:45 +0000 | [diff] [blame] | 143 | llvm::Triple TCTriple(getTriple()); |
Daniel Dunbar | 7ef7f13 | 2009-09-08 23:37:36 +0000 | [diff] [blame] | 144 | TCTriple.setArch(Arch); |
Daniel Dunbar | 30392de | 2009-09-04 18:35:21 +0000 | [diff] [blame] | 145 | |
Daniel Dunbar | 7ef7f13 | 2009-09-08 23:37:36 +0000 | [diff] [blame] | 146 | // If we recognized the arch, match it to the toolchains we support. |
Daniel Dunbar | 3bc96eb | 2010-03-26 22:41:03 +0000 | [diff] [blame] | 147 | const char *UseNewToolChain = ::getenv("CCC_ENABLE_NEW_DARWIN_TOOLCHAIN"); |
| 148 | if (UseNewToolChain || |
| 149 | Arch == llvm::Triple::arm || Arch == llvm::Triple::thumb) { |
| 150 | TC = new toolchains::DarwinClang(*this, TCTriple, DarwinVersion); |
| 151 | } else if (Arch == llvm::Triple::x86 || Arch == llvm::Triple::x86_64) { |
Daniel Dunbar | 1d4612b | 2009-09-18 08:15:13 +0000 | [diff] [blame] | 152 | // We still use the legacy DarwinGCC toolchain on X86. |
Daniel Dunbar | cc8e189 | 2010-01-27 00:56:44 +0000 | [diff] [blame] | 153 | TC = new toolchains::DarwinGCC(*this, TCTriple, DarwinVersion, |
| 154 | GCCVersion); |
Daniel Dunbar | 3bc96eb | 2010-03-26 22:41:03 +0000 | [diff] [blame] | 155 | } else |
Daniel Dunbar | 1d4612b | 2009-09-18 08:15:13 +0000 | [diff] [blame] | 156 | TC = new toolchains::Darwin_Generic_GCC(*this, TCTriple); |
Daniel Dunbar | 1fd6c4b | 2009-03-17 19:00:50 +0000 | [diff] [blame] | 157 | } |
| 158 | |
| 159 | return TC; |
Daniel Dunbar | e399564 | 2009-03-10 23:50:49 +0000 | [diff] [blame] | 160 | } |
| 161 | |
Chris Lattner | 3a47c4e | 2010-03-04 21:07:38 +0000 | [diff] [blame] | 162 | // TCE Host Info |
| 163 | |
| 164 | /// TCEHostInfo - TCE host information implementation (see http://tce.cs.tut.fi) |
| 165 | class TCEHostInfo : public HostInfo { |
| 166 | |
| 167 | public: |
| 168 | TCEHostInfo(const Driver &D, const llvm::Triple &Triple); |
Douglas Gregor | da79149 | 2010-03-08 02:49:35 +0000 | [diff] [blame] | 169 | ~TCEHostInfo() {} |
Chris Lattner | 3a47c4e | 2010-03-04 21:07:38 +0000 | [diff] [blame] | 170 | |
| 171 | virtual bool useDriverDriver() const; |
| 172 | |
| 173 | virtual types::ID lookupTypeForExtension(const char *Ext) const { |
| 174 | types::ID Ty = types::lookupTypeForExtension(Ext); |
| 175 | |
| 176 | if (Ty == types::TY_PP_Asm) |
| 177 | return types::TY_Asm; |
| 178 | |
| 179 | return Ty; |
| 180 | } |
| 181 | |
| 182 | virtual ToolChain *CreateToolChain(const ArgList &Args, |
| 183 | const char *ArchName) const; |
| 184 | }; |
| 185 | |
| 186 | TCEHostInfo::TCEHostInfo(const Driver &D, const llvm::Triple& Triple) |
| 187 | : HostInfo(D, Triple) { |
| 188 | } |
| 189 | |
| 190 | bool TCEHostInfo::useDriverDriver() const { |
| 191 | return false; |
| 192 | } |
| 193 | |
| 194 | ToolChain *TCEHostInfo::CreateToolChain(const ArgList &Args, |
| 195 | const char *ArchName) const { |
| 196 | llvm::Triple TCTriple(getTriple()); |
| 197 | // TCTriple.setArchName(ArchName); |
| 198 | return new toolchains::TCEToolChain(*this, TCTriple); |
| 199 | } |
| 200 | |
| 201 | |
Daniel Dunbar | e399564 | 2009-03-10 23:50:49 +0000 | [diff] [blame] | 202 | // Unknown Host Info |
| 203 | |
Daniel Dunbar | 2603137 | 2010-01-27 00:56:25 +0000 | [diff] [blame] | 204 | /// UnknownHostInfo - Generic host information to use for unknown hosts. |
Daniel Dunbar | 1fd6c4b | 2009-03-17 19:00:50 +0000 | [diff] [blame] | 205 | class UnknownHostInfo : public HostInfo { |
| 206 | /// Cache of tool chains we have created. |
| 207 | mutable llvm::StringMap<ToolChain*> ToolChains; |
| 208 | |
| 209 | public: |
Daniel Dunbar | cb8ab23 | 2009-05-22 02:53:45 +0000 | [diff] [blame] | 210 | UnknownHostInfo(const Driver &D, const llvm::Triple& Triple); |
Daniel Dunbar | 7e4534d | 2009-03-18 01:09:40 +0000 | [diff] [blame] | 211 | ~UnknownHostInfo(); |
Daniel Dunbar | 1fd6c4b | 2009-03-17 19:00:50 +0000 | [diff] [blame] | 212 | |
| 213 | virtual bool useDriverDriver() const; |
| 214 | |
Daniel Dunbar | e33bea4 | 2009-03-20 23:39:23 +0000 | [diff] [blame] | 215 | virtual types::ID lookupTypeForExtension(const char *Ext) const { |
| 216 | return types::lookupTypeForExtension(Ext); |
| 217 | } |
| 218 | |
Daniel Dunbar | d7502d0 | 2009-09-08 23:37:19 +0000 | [diff] [blame] | 219 | virtual ToolChain *CreateToolChain(const ArgList &Args, |
| 220 | const char *ArchName) const; |
Daniel Dunbar | 1fd6c4b | 2009-03-17 19:00:50 +0000 | [diff] [blame] | 221 | }; |
| 222 | |
Daniel Dunbar | fe8aa47 | 2009-09-08 23:37:08 +0000 | [diff] [blame] | 223 | UnknownHostInfo::UnknownHostInfo(const Driver &D, const llvm::Triple& Triple) |
Daniel Dunbar | cb8ab23 | 2009-05-22 02:53:45 +0000 | [diff] [blame] | 224 | : HostInfo(D, Triple) { |
Daniel Dunbar | e399564 | 2009-03-10 23:50:49 +0000 | [diff] [blame] | 225 | } |
| 226 | |
Daniel Dunbar | 7e4534d | 2009-03-18 01:09:40 +0000 | [diff] [blame] | 227 | UnknownHostInfo::~UnknownHostInfo() { |
| 228 | for (llvm::StringMap<ToolChain*>::iterator |
| 229 | it = ToolChains.begin(), ie = ToolChains.end(); it != ie; ++it) |
| 230 | delete it->second; |
| 231 | } |
| 232 | |
Daniel Dunbar | fe8aa47 | 2009-09-08 23:37:08 +0000 | [diff] [blame] | 233 | bool UnknownHostInfo::useDriverDriver() const { |
Daniel Dunbar | e399564 | 2009-03-10 23:50:49 +0000 | [diff] [blame] | 234 | return false; |
| 235 | } |
| 236 | |
Daniel Dunbar | d7502d0 | 2009-09-08 23:37:19 +0000 | [diff] [blame] | 237 | ToolChain *UnknownHostInfo::CreateToolChain(const ArgList &Args, |
| 238 | const char *ArchName) const { |
Daniel Dunbar | fe8aa47 | 2009-09-08 23:37:08 +0000 | [diff] [blame] | 239 | assert(!ArchName && |
Daniel Dunbar | 1fd6c4b | 2009-03-17 19:00:50 +0000 | [diff] [blame] | 240 | "Unexpected arch name on platform without driver driver support."); |
Daniel Dunbar | fe8aa47 | 2009-09-08 23:37:08 +0000 | [diff] [blame] | 241 | |
Daniel Dunbar | 1fd6c4b | 2009-03-17 19:00:50 +0000 | [diff] [blame] | 242 | // Automatically handle some instances of -m32/-m64 we know about. |
Daniel Dunbar | cb8ab23 | 2009-05-22 02:53:45 +0000 | [diff] [blame] | 243 | std::string Arch = getArchName(); |
| 244 | ArchName = Arch.c_str(); |
Daniel Dunbar | 1fd6c4b | 2009-03-17 19:00:50 +0000 | [diff] [blame] | 245 | if (Arg *A = Args.getLastArg(options::OPT_m32, options::OPT_m64)) { |
Eli Friedman | 4e2567d | 2009-06-03 18:59:56 +0000 | [diff] [blame] | 246 | if (Triple.getArch() == llvm::Triple::x86 || |
| 247 | Triple.getArch() == llvm::Triple::x86_64) { |
| 248 | ArchName = |
Daniel Dunbar | b827a05 | 2009-11-19 03:26:40 +0000 | [diff] [blame] | 249 | (A->getOption().matches(options::OPT_m32)) ? "i386" : "x86_64"; |
Eli Friedman | 4e2567d | 2009-06-03 18:59:56 +0000 | [diff] [blame] | 250 | } else if (Triple.getArch() == llvm::Triple::ppc || |
| 251 | Triple.getArch() == llvm::Triple::ppc64) { |
| 252 | ArchName = |
Daniel Dunbar | b827a05 | 2009-11-19 03:26:40 +0000 | [diff] [blame] | 253 | (A->getOption().matches(options::OPT_m32)) ? "powerpc" : "powerpc64"; |
Daniel Dunbar | 1fd6c4b | 2009-03-17 19:00:50 +0000 | [diff] [blame] | 254 | } |
Daniel Dunbar | fe8aa47 | 2009-09-08 23:37:08 +0000 | [diff] [blame] | 255 | } |
| 256 | |
Daniel Dunbar | 1fd6c4b | 2009-03-17 19:00:50 +0000 | [diff] [blame] | 257 | ToolChain *&TC = ToolChains[ArchName]; |
Daniel Dunbar | cb8ab23 | 2009-05-22 02:53:45 +0000 | [diff] [blame] | 258 | if (!TC) { |
| 259 | llvm::Triple TCTriple(getTriple()); |
| 260 | TCTriple.setArchName(ArchName); |
| 261 | |
| 262 | TC = new toolchains::Generic_GCC(*this, TCTriple); |
| 263 | } |
Daniel Dunbar | 1fd6c4b | 2009-03-17 19:00:50 +0000 | [diff] [blame] | 264 | |
Daniel Dunbar | b25c7c1 | 2009-03-18 01:39:08 +0000 | [diff] [blame] | 265 | return TC; |
Daniel Dunbar | e399564 | 2009-03-10 23:50:49 +0000 | [diff] [blame] | 266 | } |
Daniel Dunbar | 1fd6c4b | 2009-03-17 19:00:50 +0000 | [diff] [blame] | 267 | |
Daniel Dunbar | f7b8eec | 2009-06-29 20:52:51 +0000 | [diff] [blame] | 268 | // OpenBSD Host Info |
| 269 | |
| 270 | /// OpenBSDHostInfo - OpenBSD host information implementation. |
| 271 | class OpenBSDHostInfo : public HostInfo { |
| 272 | /// Cache of tool chains we have created. |
| 273 | mutable llvm::StringMap<ToolChain*> ToolChains; |
| 274 | |
| 275 | public: |
Daniel Dunbar | fe8aa47 | 2009-09-08 23:37:08 +0000 | [diff] [blame] | 276 | OpenBSDHostInfo(const Driver &D, const llvm::Triple& Triple) |
Daniel Dunbar | f7b8eec | 2009-06-29 20:52:51 +0000 | [diff] [blame] | 277 | : HostInfo(D, Triple) {} |
| 278 | ~OpenBSDHostInfo(); |
| 279 | |
| 280 | virtual bool useDriverDriver() const; |
| 281 | |
| 282 | virtual types::ID lookupTypeForExtension(const char *Ext) const { |
| 283 | return types::lookupTypeForExtension(Ext); |
| 284 | } |
| 285 | |
Daniel Dunbar | d7502d0 | 2009-09-08 23:37:19 +0000 | [diff] [blame] | 286 | virtual ToolChain *CreateToolChain(const ArgList &Args, |
| 287 | const char *ArchName) const; |
Daniel Dunbar | f7b8eec | 2009-06-29 20:52:51 +0000 | [diff] [blame] | 288 | }; |
| 289 | |
| 290 | OpenBSDHostInfo::~OpenBSDHostInfo() { |
| 291 | for (llvm::StringMap<ToolChain*>::iterator |
| 292 | it = ToolChains.begin(), ie = ToolChains.end(); it != ie; ++it) |
| 293 | delete it->second; |
| 294 | } |
| 295 | |
Daniel Dunbar | fe8aa47 | 2009-09-08 23:37:08 +0000 | [diff] [blame] | 296 | bool OpenBSDHostInfo::useDriverDriver() const { |
Daniel Dunbar | f7b8eec | 2009-06-29 20:52:51 +0000 | [diff] [blame] | 297 | return false; |
| 298 | } |
| 299 | |
Daniel Dunbar | d7502d0 | 2009-09-08 23:37:19 +0000 | [diff] [blame] | 300 | ToolChain *OpenBSDHostInfo::CreateToolChain(const ArgList &Args, |
| 301 | const char *ArchName) const { |
Daniel Dunbar | fe8aa47 | 2009-09-08 23:37:08 +0000 | [diff] [blame] | 302 | assert(!ArchName && |
Daniel Dunbar | f7b8eec | 2009-06-29 20:52:51 +0000 | [diff] [blame] | 303 | "Unexpected arch name on platform without driver driver support."); |
Daniel Dunbar | fe8aa47 | 2009-09-08 23:37:08 +0000 | [diff] [blame] | 304 | |
Daniel Dunbar | f7b8eec | 2009-06-29 20:52:51 +0000 | [diff] [blame] | 305 | std::string Arch = getArchName(); |
| 306 | ArchName = Arch.c_str(); |
Daniel Dunbar | fe8aa47 | 2009-09-08 23:37:08 +0000 | [diff] [blame] | 307 | |
Daniel Dunbar | f7b8eec | 2009-06-29 20:52:51 +0000 | [diff] [blame] | 308 | ToolChain *&TC = ToolChains[ArchName]; |
| 309 | if (!TC) { |
| 310 | llvm::Triple TCTriple(getTriple()); |
| 311 | TCTriple.setArchName(ArchName); |
| 312 | |
| 313 | TC = new toolchains::OpenBSD(*this, TCTriple); |
| 314 | } |
| 315 | |
| 316 | return TC; |
| 317 | } |
| 318 | |
Edward O'Callaghan | e7925a0 | 2009-08-22 01:06:46 +0000 | [diff] [blame] | 319 | // AuroraUX Host Info |
| 320 | |
| 321 | /// AuroraUXHostInfo - AuroraUX host information implementation. |
| 322 | class AuroraUXHostInfo : public HostInfo { |
| 323 | /// Cache of tool chains we have created. |
| 324 | mutable llvm::StringMap<ToolChain*> ToolChains; |
| 325 | |
| 326 | public: |
| 327 | AuroraUXHostInfo(const Driver &D, const llvm::Triple& Triple) |
| 328 | : HostInfo(D, Triple) {} |
| 329 | ~AuroraUXHostInfo(); |
| 330 | |
| 331 | virtual bool useDriverDriver() const; |
| 332 | |
| 333 | virtual types::ID lookupTypeForExtension(const char *Ext) const { |
| 334 | return types::lookupTypeForExtension(Ext); |
| 335 | } |
| 336 | |
Daniel Dunbar | d7502d0 | 2009-09-08 23:37:19 +0000 | [diff] [blame] | 337 | virtual ToolChain *CreateToolChain(const ArgList &Args, |
| 338 | const char *ArchName) const; |
Edward O'Callaghan | e7925a0 | 2009-08-22 01:06:46 +0000 | [diff] [blame] | 339 | }; |
| 340 | |
| 341 | AuroraUXHostInfo::~AuroraUXHostInfo() { |
| 342 | for (llvm::StringMap<ToolChain*>::iterator |
Daniel Dunbar | fe8aa47 | 2009-09-08 23:37:08 +0000 | [diff] [blame] | 343 | it = ToolChains.begin(), ie = ToolChains.end(); it != ie; ++it) |
Edward O'Callaghan | e7925a0 | 2009-08-22 01:06:46 +0000 | [diff] [blame] | 344 | delete it->second; |
| 345 | } |
| 346 | |
| 347 | bool AuroraUXHostInfo::useDriverDriver() const { |
| 348 | return false; |
| 349 | } |
| 350 | |
Daniel Dunbar | d7502d0 | 2009-09-08 23:37:19 +0000 | [diff] [blame] | 351 | ToolChain *AuroraUXHostInfo::CreateToolChain(const ArgList &Args, |
| 352 | const char *ArchName) const { |
Edward O'Callaghan | e7925a0 | 2009-08-22 01:06:46 +0000 | [diff] [blame] | 353 | assert(!ArchName && |
Daniel Dunbar | fe8aa47 | 2009-09-08 23:37:08 +0000 | [diff] [blame] | 354 | "Unexpected arch name on platform without driver driver support."); |
Edward O'Callaghan | e7925a0 | 2009-08-22 01:06:46 +0000 | [diff] [blame] | 355 | |
| 356 | ToolChain *&TC = ToolChains[getArchName()]; |
| 357 | |
| 358 | if (!TC) { |
| 359 | llvm::Triple TCTriple(getTriple()); |
| 360 | TCTriple.setArchName(getArchName()); |
| 361 | |
| 362 | TC = new toolchains::AuroraUX(*this, TCTriple); |
| 363 | } |
| 364 | |
| 365 | return TC; |
| 366 | } |
| 367 | |
Daniel Dunbar | 75358d2 | 2009-03-30 21:06:03 +0000 | [diff] [blame] | 368 | // FreeBSD Host Info |
| 369 | |
Daniel Dunbar | b85f59d | 2009-03-30 22:11:38 +0000 | [diff] [blame] | 370 | /// FreeBSDHostInfo - FreeBSD host information implementation. |
Daniel Dunbar | 75358d2 | 2009-03-30 21:06:03 +0000 | [diff] [blame] | 371 | class FreeBSDHostInfo : public HostInfo { |
| 372 | /// Cache of tool chains we have created. |
| 373 | mutable llvm::StringMap<ToolChain*> ToolChains; |
| 374 | |
| 375 | public: |
Daniel Dunbar | fe8aa47 | 2009-09-08 23:37:08 +0000 | [diff] [blame] | 376 | FreeBSDHostInfo(const Driver &D, const llvm::Triple& Triple) |
Daniel Dunbar | cb8ab23 | 2009-05-22 02:53:45 +0000 | [diff] [blame] | 377 | : HostInfo(D, Triple) {} |
Daniel Dunbar | 75358d2 | 2009-03-30 21:06:03 +0000 | [diff] [blame] | 378 | ~FreeBSDHostInfo(); |
| 379 | |
| 380 | virtual bool useDriverDriver() const; |
| 381 | |
| 382 | virtual types::ID lookupTypeForExtension(const char *Ext) const { |
| 383 | return types::lookupTypeForExtension(Ext); |
| 384 | } |
| 385 | |
Daniel Dunbar | d7502d0 | 2009-09-08 23:37:19 +0000 | [diff] [blame] | 386 | virtual ToolChain *CreateToolChain(const ArgList &Args, |
| 387 | const char *ArchName) const; |
Daniel Dunbar | 75358d2 | 2009-03-30 21:06:03 +0000 | [diff] [blame] | 388 | }; |
| 389 | |
Daniel Dunbar | 75358d2 | 2009-03-30 21:06:03 +0000 | [diff] [blame] | 390 | FreeBSDHostInfo::~FreeBSDHostInfo() { |
| 391 | for (llvm::StringMap<ToolChain*>::iterator |
| 392 | it = ToolChains.begin(), ie = ToolChains.end(); it != ie; ++it) |
| 393 | delete it->second; |
| 394 | } |
| 395 | |
Daniel Dunbar | fe8aa47 | 2009-09-08 23:37:08 +0000 | [diff] [blame] | 396 | bool FreeBSDHostInfo::useDriverDriver() const { |
Daniel Dunbar | 75358d2 | 2009-03-30 21:06:03 +0000 | [diff] [blame] | 397 | return false; |
| 398 | } |
| 399 | |
Daniel Dunbar | d7502d0 | 2009-09-08 23:37:19 +0000 | [diff] [blame] | 400 | ToolChain *FreeBSDHostInfo::CreateToolChain(const ArgList &Args, |
| 401 | const char *ArchName) const { |
Daniel Dunbar | 75358d2 | 2009-03-30 21:06:03 +0000 | [diff] [blame] | 402 | bool Lib32 = false; |
| 403 | |
Daniel Dunbar | fe8aa47 | 2009-09-08 23:37:08 +0000 | [diff] [blame] | 404 | assert(!ArchName && |
Daniel Dunbar | 75358d2 | 2009-03-30 21:06:03 +0000 | [diff] [blame] | 405 | "Unexpected arch name on platform without driver driver support."); |
Daniel Dunbar | fe8aa47 | 2009-09-08 23:37:08 +0000 | [diff] [blame] | 406 | |
Daniel Dunbar | 75358d2 | 2009-03-30 21:06:03 +0000 | [diff] [blame] | 407 | // On x86_64 we need to be able to compile 32-bits binaries as well. |
| 408 | // Compiling 64-bit binaries on i386 is not supported. We don't have a |
| 409 | // lib64. |
Daniel Dunbar | cb8ab23 | 2009-05-22 02:53:45 +0000 | [diff] [blame] | 410 | std::string Arch = getArchName(); |
| 411 | ArchName = Arch.c_str(); |
Daniel Dunbar | 75358d2 | 2009-03-30 21:06:03 +0000 | [diff] [blame] | 412 | if (Args.hasArg(options::OPT_m32) && getArchName() == "x86_64") { |
| 413 | ArchName = "i386"; |
| 414 | Lib32 = true; |
Daniel Dunbar | fe8aa47 | 2009-09-08 23:37:08 +0000 | [diff] [blame] | 415 | } |
| 416 | |
Daniel Dunbar | 75358d2 | 2009-03-30 21:06:03 +0000 | [diff] [blame] | 417 | ToolChain *&TC = ToolChains[ArchName]; |
Daniel Dunbar | cb8ab23 | 2009-05-22 02:53:45 +0000 | [diff] [blame] | 418 | if (!TC) { |
| 419 | llvm::Triple TCTriple(getTriple()); |
| 420 | TCTriple.setArchName(ArchName); |
| 421 | |
| 422 | TC = new toolchains::FreeBSD(*this, TCTriple, Lib32); |
| 423 | } |
Daniel Dunbar | 75358d2 | 2009-03-30 21:06:03 +0000 | [diff] [blame] | 424 | |
| 425 | return TC; |
| 426 | } |
| 427 | |
Daniel Dunbar | 11e1b40 | 2009-05-02 18:28:39 +0000 | [diff] [blame] | 428 | // DragonFly Host Info |
| 429 | |
| 430 | /// DragonFlyHostInfo - DragonFly host information implementation. |
| 431 | class DragonFlyHostInfo : public HostInfo { |
| 432 | /// Cache of tool chains we have created. |
| 433 | mutable llvm::StringMap<ToolChain*> ToolChains; |
| 434 | |
| 435 | public: |
Daniel Dunbar | cb8ab23 | 2009-05-22 02:53:45 +0000 | [diff] [blame] | 436 | DragonFlyHostInfo(const Driver &D, const llvm::Triple& Triple) |
| 437 | : HostInfo(D, Triple) {} |
Daniel Dunbar | 11e1b40 | 2009-05-02 18:28:39 +0000 | [diff] [blame] | 438 | ~DragonFlyHostInfo(); |
| 439 | |
| 440 | virtual bool useDriverDriver() const; |
| 441 | |
| 442 | virtual types::ID lookupTypeForExtension(const char *Ext) const { |
| 443 | return types::lookupTypeForExtension(Ext); |
| 444 | } |
| 445 | |
Daniel Dunbar | d7502d0 | 2009-09-08 23:37:19 +0000 | [diff] [blame] | 446 | virtual ToolChain *CreateToolChain(const ArgList &Args, |
| 447 | const char *ArchName) const; |
Daniel Dunbar | 11e1b40 | 2009-05-02 18:28:39 +0000 | [diff] [blame] | 448 | }; |
| 449 | |
Daniel Dunbar | 11e1b40 | 2009-05-02 18:28:39 +0000 | [diff] [blame] | 450 | DragonFlyHostInfo::~DragonFlyHostInfo() { |
| 451 | for (llvm::StringMap<ToolChain*>::iterator |
| 452 | it = ToolChains.begin(), ie = ToolChains.end(); it != ie; ++it) |
| 453 | delete it->second; |
| 454 | } |
| 455 | |
Daniel Dunbar | fe8aa47 | 2009-09-08 23:37:08 +0000 | [diff] [blame] | 456 | bool DragonFlyHostInfo::useDriverDriver() const { |
Daniel Dunbar | 11e1b40 | 2009-05-02 18:28:39 +0000 | [diff] [blame] | 457 | return false; |
| 458 | } |
| 459 | |
Daniel Dunbar | d7502d0 | 2009-09-08 23:37:19 +0000 | [diff] [blame] | 460 | ToolChain *DragonFlyHostInfo::CreateToolChain(const ArgList &Args, |
| 461 | const char *ArchName) const { |
Daniel Dunbar | fe8aa47 | 2009-09-08 23:37:08 +0000 | [diff] [blame] | 462 | assert(!ArchName && |
Daniel Dunbar | 11e1b40 | 2009-05-02 18:28:39 +0000 | [diff] [blame] | 463 | "Unexpected arch name on platform without driver driver support."); |
| 464 | |
Daniel Dunbar | cb8ab23 | 2009-05-22 02:53:45 +0000 | [diff] [blame] | 465 | ToolChain *&TC = ToolChains[getArchName()]; |
Daniel Dunbar | 11e1b40 | 2009-05-02 18:28:39 +0000 | [diff] [blame] | 466 | |
Daniel Dunbar | cb8ab23 | 2009-05-22 02:53:45 +0000 | [diff] [blame] | 467 | if (!TC) { |
| 468 | llvm::Triple TCTriple(getTriple()); |
| 469 | TCTriple.setArchName(getArchName()); |
Daniel Dunbar | 11e1b40 | 2009-05-02 18:28:39 +0000 | [diff] [blame] | 470 | |
Daniel Dunbar | cb8ab23 | 2009-05-22 02:53:45 +0000 | [diff] [blame] | 471 | TC = new toolchains::DragonFly(*this, TCTriple); |
| 472 | } |
Daniel Dunbar | 11e1b40 | 2009-05-02 18:28:39 +0000 | [diff] [blame] | 473 | |
Daniel Dunbar | 11e1b40 | 2009-05-02 18:28:39 +0000 | [diff] [blame] | 474 | return TC; |
| 475 | } |
| 476 | |
Eli Friedman | 6b3454a | 2009-05-26 07:52:18 +0000 | [diff] [blame] | 477 | // Linux Host Info |
| 478 | |
| 479 | /// LinuxHostInfo - Linux host information implementation. |
| 480 | class LinuxHostInfo : public HostInfo { |
| 481 | /// Cache of tool chains we have created. |
| 482 | mutable llvm::StringMap<ToolChain*> ToolChains; |
| 483 | |
| 484 | public: |
| 485 | LinuxHostInfo(const Driver &D, const llvm::Triple& Triple) |
| 486 | : HostInfo(D, Triple) {} |
| 487 | ~LinuxHostInfo(); |
| 488 | |
| 489 | virtual bool useDriverDriver() const; |
| 490 | |
| 491 | virtual types::ID lookupTypeForExtension(const char *Ext) const { |
| 492 | return types::lookupTypeForExtension(Ext); |
| 493 | } |
| 494 | |
Daniel Dunbar | d7502d0 | 2009-09-08 23:37:19 +0000 | [diff] [blame] | 495 | virtual ToolChain *CreateToolChain(const ArgList &Args, |
| 496 | const char *ArchName) const; |
Eli Friedman | 6b3454a | 2009-05-26 07:52:18 +0000 | [diff] [blame] | 497 | }; |
| 498 | |
| 499 | LinuxHostInfo::~LinuxHostInfo() { |
| 500 | for (llvm::StringMap<ToolChain*>::iterator |
| 501 | it = ToolChains.begin(), ie = ToolChains.end(); it != ie; ++it) |
| 502 | delete it->second; |
| 503 | } |
| 504 | |
Daniel Dunbar | fe8aa47 | 2009-09-08 23:37:08 +0000 | [diff] [blame] | 505 | bool LinuxHostInfo::useDriverDriver() const { |
Eli Friedman | 6b3454a | 2009-05-26 07:52:18 +0000 | [diff] [blame] | 506 | return false; |
| 507 | } |
| 508 | |
Daniel Dunbar | d7502d0 | 2009-09-08 23:37:19 +0000 | [diff] [blame] | 509 | ToolChain *LinuxHostInfo::CreateToolChain(const ArgList &Args, |
| 510 | const char *ArchName) const { |
Eli Friedman | 6b3454a | 2009-05-26 07:52:18 +0000 | [diff] [blame] | 511 | |
Daniel Dunbar | fe8aa47 | 2009-09-08 23:37:08 +0000 | [diff] [blame] | 512 | assert(!ArchName && |
Eli Friedman | 6b3454a | 2009-05-26 07:52:18 +0000 | [diff] [blame] | 513 | "Unexpected arch name on platform without driver driver support."); |
| 514 | |
Eli Friedman | 4e2567d | 2009-06-03 18:59:56 +0000 | [diff] [blame] | 515 | // Automatically handle some instances of -m32/-m64 we know about. |
| 516 | std::string Arch = getArchName(); |
| 517 | ArchName = Arch.c_str(); |
| 518 | if (Arg *A = Args.getLastArg(options::OPT_m32, options::OPT_m64)) { |
| 519 | if (Triple.getArch() == llvm::Triple::x86 || |
| 520 | Triple.getArch() == llvm::Triple::x86_64) { |
| 521 | ArchName = |
Daniel Dunbar | b827a05 | 2009-11-19 03:26:40 +0000 | [diff] [blame] | 522 | (A->getOption().matches(options::OPT_m32)) ? "i386" : "x86_64"; |
Eli Friedman | 4e2567d | 2009-06-03 18:59:56 +0000 | [diff] [blame] | 523 | } else if (Triple.getArch() == llvm::Triple::ppc || |
| 524 | Triple.getArch() == llvm::Triple::ppc64) { |
| 525 | ArchName = |
Daniel Dunbar | b827a05 | 2009-11-19 03:26:40 +0000 | [diff] [blame] | 526 | (A->getOption().matches(options::OPT_m32)) ? "powerpc" : "powerpc64"; |
Eli Friedman | 4e2567d | 2009-06-03 18:59:56 +0000 | [diff] [blame] | 527 | } |
| 528 | } |
| 529 | |
Eli Friedman | 6b3454a | 2009-05-26 07:52:18 +0000 | [diff] [blame] | 530 | ToolChain *&TC = ToolChains[ArchName]; |
| 531 | |
| 532 | if (!TC) { |
| 533 | llvm::Triple TCTriple(getTriple()); |
Eli Friedman | 4e2567d | 2009-06-03 18:59:56 +0000 | [diff] [blame] | 534 | TCTriple.setArchName(ArchName); |
Eli Friedman | 6b3454a | 2009-05-26 07:52:18 +0000 | [diff] [blame] | 535 | |
| 536 | TC = new toolchains::Linux(*this, TCTriple); |
| 537 | } |
| 538 | |
| 539 | return TC; |
| 540 | } |
| 541 | |
Daniel Dunbar | 1fd6c4b | 2009-03-17 19:00:50 +0000 | [diff] [blame] | 542 | } |
| 543 | |
Daniel Dunbar | cb8ab23 | 2009-05-22 02:53:45 +0000 | [diff] [blame] | 544 | const HostInfo * |
Edward O'Callaghan | e7925a0 | 2009-08-22 01:06:46 +0000 | [diff] [blame] | 545 | clang::driver::createAuroraUXHostInfo(const Driver &D, |
Daniel Dunbar | fe8aa47 | 2009-09-08 23:37:08 +0000 | [diff] [blame] | 546 | const llvm::Triple& Triple){ |
Edward O'Callaghan | e7925a0 | 2009-08-22 01:06:46 +0000 | [diff] [blame] | 547 | return new AuroraUXHostInfo(D, Triple); |
| 548 | } |
| 549 | |
| 550 | const HostInfo * |
Daniel Dunbar | cb8ab23 | 2009-05-22 02:53:45 +0000 | [diff] [blame] | 551 | clang::driver::createDarwinHostInfo(const Driver &D, |
| 552 | const llvm::Triple& Triple){ |
| 553 | return new DarwinHostInfo(D, Triple); |
Daniel Dunbar | 1fd6c4b | 2009-03-17 19:00:50 +0000 | [diff] [blame] | 554 | } |
| 555 | |
Daniel Dunbar | cb8ab23 | 2009-05-22 02:53:45 +0000 | [diff] [blame] | 556 | const HostInfo * |
Daniel Dunbar | fe8aa47 | 2009-09-08 23:37:08 +0000 | [diff] [blame] | 557 | clang::driver::createOpenBSDHostInfo(const Driver &D, |
Daniel Dunbar | f7b8eec | 2009-06-29 20:52:51 +0000 | [diff] [blame] | 558 | const llvm::Triple& Triple) { |
| 559 | return new OpenBSDHostInfo(D, Triple); |
| 560 | } |
| 561 | |
| 562 | const HostInfo * |
Daniel Dunbar | fe8aa47 | 2009-09-08 23:37:08 +0000 | [diff] [blame] | 563 | clang::driver::createFreeBSDHostInfo(const Driver &D, |
Daniel Dunbar | cb8ab23 | 2009-05-22 02:53:45 +0000 | [diff] [blame] | 564 | const llvm::Triple& Triple) { |
| 565 | return new FreeBSDHostInfo(D, Triple); |
Daniel Dunbar | 75358d2 | 2009-03-30 21:06:03 +0000 | [diff] [blame] | 566 | } |
| 567 | |
Daniel Dunbar | cb8ab23 | 2009-05-22 02:53:45 +0000 | [diff] [blame] | 568 | const HostInfo * |
| 569 | clang::driver::createDragonFlyHostInfo(const Driver &D, |
| 570 | const llvm::Triple& Triple) { |
| 571 | return new DragonFlyHostInfo(D, Triple); |
Daniel Dunbar | 11e1b40 | 2009-05-02 18:28:39 +0000 | [diff] [blame] | 572 | } |
| 573 | |
Daniel Dunbar | cb8ab23 | 2009-05-22 02:53:45 +0000 | [diff] [blame] | 574 | const HostInfo * |
Eli Friedman | 6b3454a | 2009-05-26 07:52:18 +0000 | [diff] [blame] | 575 | clang::driver::createLinuxHostInfo(const Driver &D, |
| 576 | const llvm::Triple& Triple) { |
| 577 | return new LinuxHostInfo(D, Triple); |
| 578 | } |
| 579 | |
| 580 | const HostInfo * |
Chris Lattner | 3a47c4e | 2010-03-04 21:07:38 +0000 | [diff] [blame] | 581 | clang::driver::createTCEHostInfo(const Driver &D, |
| 582 | const llvm::Triple& Triple) { |
| 583 | return new TCEHostInfo(D, Triple); |
| 584 | } |
| 585 | |
| 586 | const HostInfo * |
Daniel Dunbar | cb8ab23 | 2009-05-22 02:53:45 +0000 | [diff] [blame] | 587 | clang::driver::createUnknownHostInfo(const Driver &D, |
| 588 | const llvm::Triple& Triple) { |
| 589 | return new UnknownHostInfo(D, Triple); |
Daniel Dunbar | 1fd6c4b | 2009-03-17 19:00:50 +0000 | [diff] [blame] | 590 | } |