[cfe-commits] r69864 - /cfe/trunk/lib/Basic/Targets.cpp
Chris Lattner
sabre at nondot.org
Wed Apr 22 21:22:04 PDT 2009
Author: lattner
Date: Wed Apr 22 23:22:04 2009
New Revision: 69864
URL: http://llvm.org/viewvc/llvm-project?rev=69864&view=rev
Log:
some arm triples have weird characters in them, just fuzzy match
on armv* to be more compatible
Modified:
cfe/trunk/lib/Basic/Targets.cpp
Modified: cfe/trunk/lib/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/Targets.cpp?rev=69864&r1=69863&r2=69864&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/Targets.cpp (original)
+++ cfe/trunk/lib/Basic/Targets.cpp Wed Apr 22 23:22:04 2009
@@ -930,14 +930,20 @@
// FIXME: Are the defaults correct for ARM?
DescriptionString = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-"
"i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:64:64";
- if (triple.find("arm-") || triple.find("armv6-"))
+ if (triple.find("arm-") == 0 || triple.find("armv6-") == 0)
ArmArch = Armv6;
- else if (triple.find("armv5-"))
+ else if (triple.find("armv5-") == 0)
ArmArch = Armv5;
- else if (triple.find("armv4t-"))
+ else if (triple.find("armv4t-") == 0)
ArmArch = Armv4t;
- else if (triple.find("xscale-"))
+ else if (triple.find("xscale-") == 0)
ArmArch = XScale;
+ else if (triple.find("armv") == 0) {
+ // FIXME: fuzzy match for other random weird arm triples. This is useful
+ // for the static analyzer and other clients, but probably should be
+ // re-evaluated when codegen is brought up.
+ ArmArch = Armv6;
+ }
}
virtual void getTargetDefines(const LangOptions &Opts,
std::vector<char> &Defs) const {
@@ -1232,9 +1238,7 @@
return new PPC64TargetInfo(T);
}
- if (T.find("armv6-") == 0 || T.find("arm-") == 0
- || T.find("armv4t") == 0 || T.find("armv5-") == 0
- || T.find("xscale") == 0) {
+ if (T.find("armv") == 0 || T.find("arm-") == 0 || T.find("xscale") == 0) {
if (isDarwin)
return new DarwinARMTargetInfo(T);
if (isFreeBSD)
More information about the cfe-commits
mailing list