Charlie,

-        if (getToolChain().getTriple().getSubArch() ==
-            llvm::Triple::SubArchType::ARMSubArch_v6m)
+        if (arm::getLLVMArchSuffixForARM(CPUName) == StringRef("v6m"))

I'm surprised that the SubArchType isn't being set correctly from the
combination of `-target thumb-none-linux-eabi -mcpu=cortex-m0`. I think the
"right" fix is to track down why that's happening and fix it there instead,
rather than regressing the subarch triple stuff back toward a stryingly-typed 
mess.


Cheers,

Jon

On 10/6/14 10:27 AM, Charlie Turner wrote:
> Hi,
> 
> The following command correctly produces a diagnostic that specifying
> -munaligned-access for a v6M core is an error,
> 
> clang -c -target thumbv6m-none-linux-eabi -mcpu=cortex-m0 -munaligned-access
> empty.c
> 
> But the next command does not,
> 
> clang -c -target thumb-none-linux-eabi -mcpu=cortex-m0 -munaligned-access
> empty.c
> 
> In the second command, "thumv6m" has been replaced with "thumb". 
> 
> This patch causes the second command to issue the same diagnostic as the
> first.
> 
> Please find the patch attached.
> 
> Thanks,
> Charlie.
> 
> 
> 
> _______________________________________________
> cfe-commits mailing list
> [email protected]
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
> 

-- 
Jon Roelofs
[email protected]
CodeSourcery / Mentor Embedded
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to