rengolin added inline comments.

================
Comment at: lib/Driver/ToolChain.cpp:485
@@ +484,3 @@
+    if ((ARM::parseArchProfile(Suffix) == ARM::PK_M) ||
+        (InputType != types::TY_PP_Asm &&
+         Args.hasFlag(options::OPT_mthumb, options::OPT_mno_thumb, 
ThumbDefault)))
----------------
labrinea wrote:
> Alternatively we could remove the check of InputType. I am not sure why this 
> and the above comment are present anyway.
I agree with you, this logic is inconsistent.

Historically, ARM assembly (especially inline assembly) is assumed ARM unless 
told otherwise. This is why you have to specify ".thumb" and not ".arm". 
However, that doesn't mean the assembly file *has* to be ARM, even if the arch 
name is "thumbvN" or if "-mthumb" is specified.

Not even GNU tools behave in such odd ways, so I think we should be consistent. 
If the triple is thumb, asm is thumb. If we have -mthumb, asm is thumb. If not, 
it's arm. Precisely how everything else works, so it's only logical that we 
should remove the InputType check.


http://reviews.llvm.org/D14121



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to