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

Senthil Kumar Selvaraj via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 7 23:16:19 PST 2016


saaadhu updated this revision to Diff 80721.
saaadhu added a comment.

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?


https://reviews.llvm.org/D27123

Files:
  lib/Basic/Targets.cpp
  lib/Driver/Driver.cpp
  lib/Driver/ToolChains.cpp
  lib/Driver/ToolChains.h
  lib/Driver/Tools.cpp
  lib/Driver/Tools.h
  test/Driver/avr-toolchain.c
  test/Preprocessor/init.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27123.80721.patch
Type: text/x-patch
Size: 15119 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161208/cbbc4c06/attachment-0001.bin>


More information about the cfe-commits mailing list