summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/avr/target-cpu-defines/common.c
diff options
context:
space:
mode:
authorDylan McKay <dylanmckay34@gmail.com>2017-02-06 09:07:56 +0000
committerDylan McKay <dylanmckay34@gmail.com>2017-02-06 09:07:56 +0000
commit8464c9b5792c8b792f38991a421c5c854b91b293 (patch)
tree5d3487bfde07efab8a31ea5bf23794aae4843a39 /clang/test/CodeGen/avr/target-cpu-defines/common.c
parentd31534cd3a185c2968257096064b4ded92c3bedb (diff)
downloadbcm5719-llvm-8464c9b5792c8b792f38991a421c5c854b91b293.tar.gz
bcm5719-llvm-8464c9b5792c8b792f38991a421c5c854b91b293.zip
[AVR] Allow specifying the CPU on the command line
Summary: This tells clang about all of the different AVR microcontrollers. It also adds code to define the correct preprocessor macros for each device. Reviewers: jroelofs, asl Reviewed By: asl Subscribers: asl, cfe-commits Differential Revision: https://reviews.llvm.org/D28346 llvm-svn: 294177
Diffstat (limited to 'clang/test/CodeGen/avr/target-cpu-defines/common.c')
-rw-r--r--clang/test/CodeGen/avr/target-cpu-defines/common.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/test/CodeGen/avr/target-cpu-defines/common.c b/clang/test/CodeGen/avr/target-cpu-defines/common.c
new file mode 100644
index 00000000000..0cf4d30d5e2
--- /dev/null
+++ b/clang/test/CodeGen/avr/target-cpu-defines/common.c
@@ -0,0 +1,5 @@
+// RUN: %clang_cc1 -E -dM -triple avr-unknown-unknown /dev/null | FileCheck -match-full-lines %s
+
+// CHECK: #define AVR 1
+// CHECK: #define __AVR 1
+// CHECK: #define __AVR__ 1
OpenPOWER on IntegriCloud