llvm.org GIT mirror llvm / 6d42bbf
Remove Triple::getArchTypeForDarwinArchName. I lives on the clang driver now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167157 91177308-0d34-0410-b5e6-96231b3b80d8 Rafael Espindola 6 years ago
2 changed file(s) with 0 addition(s) and 37 deletion(s). Raw diff Collapse all Expand all
425425 /// architecture name (e.g., "x86").
426426 static ArchType getArchTypeForLLVMName(StringRef Str);
427427
428 /// getArchTypeForDarwinArchName - Get the architecture type for a "Darwin"
429 /// architecture name, for example as accepted by "gcc -arch" (see also
430 /// arch(3)).
431 static ArchType getArchTypeForDarwinArchName(StringRef Str);
432
433428 /// @}
434429 };
435430
177177 .Case("amdil", amdil)
178178 .Case("spir", spir)
179179 .Default(UnknownArch);
180 }
181
182 Triple::ArchType Triple::getArchTypeForDarwinArchName(StringRef Str) {
183 // See arch(3) and llvm-gcc's driver-driver.c. We don't implement support for
184 // archs which Darwin doesn't use.
185
186 // The matching this routine does is fairly pointless, since it is neither the
187 // complete architecture list, nor a reasonable subset. The problem is that
188 // historically the driver driver accepts this and also ties its -march=
189 // handling to the architecture name, so we need to be careful before removing
190 // support for it.
191
192 // This code must be kept in sync with Clang's Darwin specific argument
193 // translation.
194
195 return StringSwitch(Str)
196 .Cases("ppc", "ppc601", "ppc603", "ppc604", "ppc604e", Triple::ppc)
197 .Cases("ppc750", "ppc7400", "ppc7450", "ppc970", Triple::ppc)
198 .Case("ppc64", Triple::ppc64)
199 .Cases("i386", "i486", "i486SX", "i586", "i686", Triple::x86)
200 .Cases("pentium", "pentpro", "pentIIm3", "pentIIm5", "pentium4",
201 Triple::x86)
202 .Case("x86_64", Triple::x86_64)
203 // This is derived from the driver driver.
204 .Cases("arm", "armv4t", "armv5", "armv6", Triple::arm)
205 .Cases("armv7", "armv7f", "armv7k", "armv7s", "xscale", Triple::arm)
206 .Case("r600", Triple::r600)
207 .Case("nvptx", Triple::nvptx)
208 .Case("nvptx64", Triple::nvptx64)
209 .Case("amdil", Triple::amdil)
210 .Case("spir", Triple::spir)
211 .Default(Triple::UnknownArch);
212180 }
213181
214182 // Returns architecture name that is understood by the target assembler.