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

Jonathan Roelofs via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Dec 8 07:11:31 PST 2016


jroelofs added a subscriber: rengolin.
jroelofs added a comment.

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?


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