aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Bitcode
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2010-02-12 20:39:35 +0000
committerEvan Cheng <evan.cheng@apple.com>2010-02-12 20:39:35 +0000
commit3922a9ba84d91e67e6baa63fed3b0455d7de7b4a (patch)
treeb29fb1f4559ac590f434909797e6cbc3d08a7890 /lib/Bitcode
parent0a799ab15801d4ebf68eeb151d6375a799c87d9a (diff)
downloadexternal_llvm-3922a9ba84d91e67e6baa63fed3b0455d7de7b4a.zip
external_llvm-3922a9ba84d91e67e6baa63fed3b0455d7de7b4a.tar.gz
external_llvm-3922a9ba84d91e67e6baa63fed3b0455d7de7b4a.tar.bz2
Also recognize armv6t2-* and armv5te-* triplets.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96008 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Bitcode')
-rw-r--r--lib/Bitcode/Writer/BitcodeWriter.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/lib/Bitcode/Writer/BitcodeWriter.cpp b/lib/Bitcode/Writer/BitcodeWriter.cpp
index 3675f7b..ec081d5 100644
--- a/lib/Bitcode/Writer/BitcodeWriter.cpp
+++ b/lib/Bitcode/Writer/BitcodeWriter.cpp
@@ -1511,7 +1511,7 @@ enum {
};
/// isARMTriplet - Return true if the triplet looks like:
-/// arm-*, thumb-*, armv[0-9]-*, thumbv[0-9]-*
+/// arm-*, thumb-*, armv[0-9]-*, thumbv[0-9]-*, armv5te-*, or armv6t2-*.
static bool isARMTriplet(const std::string &TT) {
size_t Pos = 0;
size_t Size = TT.size();
@@ -1526,7 +1526,14 @@ static bool isARMTriplet(const std::string &TT) {
if (TT[Pos] == '-')
return true;
- else if (TT[Pos] != 'v')
+ else if (TT[Pos] == 'v') {
+ if (Size >= Pos+4 &&
+ TT[Pos+1] == '6' && TT[Pos+2] == 't' && TT[Pos+3] == '2')
+ return true;
+ else if (Size >= Pos+4 &&
+ TT[Pos+1] == '5' && TT[Pos+2] == 't' && TT[Pos+3] == 'e')
+ return true;
+ } else
return false;
while (++Pos < Size && TT[Pos] != '-') {
if (!isdigit(TT[Pos]))
@@ -1540,9 +1547,9 @@ static void EmitDarwinBCHeader(BitstreamWriter &Stream,
unsigned CPUType = ~0U;
// Match x86_64-*, i[3-9]86-*, powerpc-*, powerpc64-*, arm-*, thumb-*,
- // armv[0-9]-*, thumbv[0-9]-*. The CPUType is a magic number from
- // /usr/include/mach/machine.h. It is ok to reproduce the specific constants
- // here because they are implicitly part of the Darwin ABI.
+ // armv[0-9]-*, thumbv[0-9]-*, armv5te-*, or armv6t2-*. The CPUType is a magic
+ // number from /usr/include/mach/machine.h. It is ok to reproduce the
+ // specific constants here because they are implicitly part of the Darwin ABI.
enum {
DARWIN_CPU_ARCH_ABI64 = 0x01000000,
DARWIN_CPU_TYPE_X86 = 7,