From: Alexandros Lamprineas Date: Thu, 5 Nov 2015 17:11:55 +0000 (+0000) Subject: [ARM] Clang gives unintended warning message for 'mthumb' + M-profiles: X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c02ad0f182398117e4cccd1f1efd7eb21f6ec7e6;p=clang [ARM] Clang gives unintended warning message for 'mthumb' + M-profiles: $ 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 --- diff --git a/lib/Driver/ToolChain.cpp b/lib/Driver/ToolChain.cpp index ec62fba566..a41a3b2661 100644 --- a/lib/Driver/ToolChain.cpp +++ b/lib/Driver/ToolChain.cpp @@ -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