[PATCH] D27123: Add AVR target and toolchain to Clang

Jonathan Roelofs via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 14 07:29:47 PST 2016


jroelofs added a comment.

In https://reviews.llvm.org/D27123#617118, @jroelofs wrote:

> In https://reviews.llvm.org/D27123#616887, @saaadhu wrote:
>
> > Make defines for CHAR16_TYPE, {U,}INT_{LEAST,FAST}16_TYPE use int instead of short.
> >
> > {U,}INT16_TYPE still gets defined as short though - lib/Frontend/InitPreprocessor.cpp::DefineExactWidthIntType does not use TargetInfo::getIntTypeByWidth. Instead, InitializePredefinedMacros calls the function with the specific type (SignedShort/UnsignedShort), as getShortWidth() > getCharWidth(), but getIntWidth() == getShortWidth(). Not sure what the best way to fix that is - should I make DefineExactWidthType use TargetInfo::getIntTypeByWidth?
>


If you do, it might break other things. Might be better to leave this alone, and leave a comment with a PR for it, explaining where the differences are.

> I'm not sure either. I think it's a good question for @rengolin.




https://reviews.llvm.org/D27123





More information about the cfe-commits mailing list