[PATCH] D22855: [ARM] Pass thumb as architecture to the underlying tools, when targeting windows

Martin Storsjö via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 27 06:32:26 PDT 2016


mstorsjo updated this revision to Diff 65725.
mstorsjo added a comment.

Updated the test to only check what triplet is passed to the assembler


https://reviews.llvm.org/D22855

Files:
  lib/Driver/ToolChain.cpp
  test/Driver/windows-thumb.s

Index: test/Driver/windows-thumb.s
===================================================================
--- /dev/null
+++ test/Driver/windows-thumb.s
@@ -0,0 +1,2 @@
+; RUN: %clang -target armv7-windows -c -### %s 2>&1 | FileCheck %s
+; CHECK: "-triple" "thumbv7-
Index: lib/Driver/ToolChain.cpp
===================================================================
--- lib/Driver/ToolChain.cpp
+++ lib/Driver/ToolChain.cpp
@@ -493,8 +493,10 @@
       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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22855.65725.patch
Type: text/x-patch
Size: 892 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160727/0ba6470d/attachment-0001.bin>


More information about the cfe-commits mailing list