]> granicus.if.org Git - clang/commit
[AVR] Fix __AVR_xxx macro definitions; authored by Peter Wu
authorDylan McKay <me@dylanmckay.io>
Sat, 11 Feb 2017 21:06:07 +0000 (21:06 +0000)
committerDylan McKay <me@dylanmckay.io>
Sat, 11 Feb 2017 21:06:07 +0000 (21:06 +0000)
commitdca8dcbbacc942fcdf53f3b5bf68b6ecec66b73e
treeec12aff2a91d9a43c53bc97b99f24bf3d67e404e
parent6b3307abeea42f8080f3f0260d11b291490285fb
[AVR] Fix __AVR_xxx macro definitions; authored by Peter Wu

Summary:
The -mmcu option for GCC sets macros like __AVR_ATmega328P__ (with the trailing
underscores), be sure to include these underscores for Clangs -mcpu option.

See "AVR Built-in Macros" in https://gcc.gnu.org/onlinedocs/gcc/AVR-Options.html

Reviewers: jroelofs, dylanmckay

Reviewed By: jroelofs, dylanmckay

Subscribers: efriedma, cfe-commits

Differential Revision: https://reviews.llvm.org/D29817

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@294869 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Basic/Targets.cpp
test/CodeGen/avr/target-cpu-defines/atmega328p.c
test/CodeGen/avr/target-cpu-defines/attiny104.c