[PATCH] Emit diagnostic for -munaligned-access on v6m

Charlie Turner charlie.turner at arm.com
Tue Oct 7 01:01:23 PDT 2014


Hi Jon,

Thanks for the review.

> 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.

Should have loaded more surrounding context into my head when I made this
change, noticed a simpler way of fixing this issue. The problem was calling
getToolChain().getTriple() rather than
getToolChain().ComputeEffectiveClangTriple(..), the later takes into account
the CPU given as well as the architecture.

New patch attached.

Thanks,
Charlie.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Diagnostic-for-munaligned-access-on-v6M-targets.patch
Type: application/octet-stream
Size: 2324 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20141007/41af99db/attachment.obj>


More information about the cfe-commits mailing list