]> granicus.if.org Git - clang/commitdiff
[ARM] Clang gives unintended warning message for 'mthumb' + M-profiles:
authorAlexandros Lamprineas <alexandros.lamprineas@arm.com>
Thu, 5 Nov 2015 17:11:55 +0000 (17:11 +0000)
committerAlexandros Lamprineas <alexandros.lamprineas@arm.com>
Thu, 5 Nov 2015 17:11:55 +0000 (17:11 +0000)
$ clang --target=armv7m-none-eabi -mthumb -march=armv7-m -c test.c
clang-3.8: warning: argument unused during compilation: '-mthumb'

Differential Revision: http://reviews.llvm.org/D14384

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@252175 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/ToolChain.cpp

index ec62fba566c43efce239f31839043138416afacc..a41a3b2661338f69331eb18303416abdb7794aac 100644 (file)
@@ -481,9 +481,8 @@ std::string ToolChain::ComputeLLVMTriple(const ArgList &Args,
       ArchName = "arm";
 
     // Assembly files should start in ARM mode, unless arch is M-profile.
-    if (IsMProfile || (InputType != types::TY_PP_Asm &&
-         Args.hasFlag(options::OPT_mthumb, options::OPT_mno_thumb, ThumbDefault)))
-    {
+    if ((InputType != types::TY_PP_Asm && Args.hasFlag(options::OPT_mthumb,
+         options::OPT_mno_thumb, ThumbDefault)) || IsMProfile) {
       if (IsBigEndian)
         ArchName = "thumbeb";
       else