mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 19:23:23 +01:00
Correctly handle the degenerated triple "thumb".
Fixes a crash in llc where some parts think the target is thumb and others think it is ARM. llvm-svn: 197607
This commit is contained in:
parent
2639825176
commit
6dc5fe883a
@ -89,14 +89,11 @@ std::string ARM_MC::ParseARMTriple(StringRef TT, StringRef CPU) {
|
||||
unsigned Idx = 0;
|
||||
|
||||
// FIXME: Enhance Triple helper class to extract ARM version.
|
||||
bool isThumb = false;
|
||||
bool isThumb = triple.getArch() == Triple::thumb;
|
||||
if (Len >= 5 && TT.substr(0, 4) == "armv")
|
||||
Idx = 4;
|
||||
else if (Len >= 6 && TT.substr(0, 5) == "thumb") {
|
||||
isThumb = true;
|
||||
if (Len >= 7 && TT[5] == 'v')
|
||||
else if (Len >= 7 && TT.substr(0, 6) == "thumbv")
|
||||
Idx = 6;
|
||||
}
|
||||
|
||||
bool NoCPU = CPU == "generic" || CPU.empty();
|
||||
std::string ARMArchFeature;
|
||||
|
7
test/CodeGen/Thumb/triple.ll
Normal file
7
test/CodeGen/Thumb/triple.ll
Normal file
@ -0,0 +1,7 @@
|
||||
; RUN: llc < %s -mtriple=thumb | FileCheck %s
|
||||
|
||||
; CHECK: .code 16
|
||||
|
||||
define void @f() {
|
||||
ret void
|
||||
}
|
Loading…
Reference in New Issue
Block a user