This makes sure that the thumb section flag gets set by the assembler.
Patch by Martin Storsjö.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@276869
91177308-0d34-0410-b5e6-
96231b3b80d8
ArchName = "arm";
// Assembly files should start in ARM mode, unless arch is M-profile.
+ // Windows is always thumb.
if ((InputType != types::TY_PP_Asm && Args.hasFlag(options::OPT_mthumb,
- options::OPT_mno_thumb, ThumbDefault)) || IsMProfile) {
+ options::OPT_mno_thumb, ThumbDefault)) || IsMProfile ||
+ getTriple().isOSWindows()) {
if (IsBigEndian)
ArchName = "thumbeb";
else
--- /dev/null
+; RUN: %clang -target armv7-windows -c -### %s 2>&1 | FileCheck %s
+; CHECK: "-triple" "thumbv7-