Skip to content
This repository has been archived by the owner on Sep 2, 2018. It is now read-only.

Process #define's for all MCUs #6

Open
dylanmckay opened this issue Aug 20, 2015 · 0 comments
Open

Process #define's for all MCUs #6

dylanmckay opened this issue Aug 20, 2015 · 0 comments

Comments

@dylanmckay
Copy link
Member

in lib/Basic/Targets.cpp inside class AVRTargetInfo, we currently handle a few different MCUs and set the processor defines appropriately.

if (CPU == "atmega328") {
    Builder.defineMacro("__AVR_ATmega328__");
} else if (CPU == "atmega328p") {
    Builder.defineMacro("__AVR_ATmega328P__");
} else if (CPU == "atmega168") {
    Builder.defineMacro("__AVR_ATmega168__");
} else if (CPU == "atmega168p") {
...

This should be rewritten as a StringSwitch, and the entire set of supported CPUs should be added, Ideally, a warning would also be emitted along the lines of "unknown MCU" if we don't recognise this.

A goal might be to allow MCUs to be specified inside a TableGen file - perhaps AVRMCUs.def, and have all information in one centralized place.

dylanmckay pushed a commit that referenced this issue May 7, 2016
Updated the expected diagnostics of 17 OpenMP tests.
The changes to each test are identical.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@265982 91177308-0d34-0410-b5e6-96231b3b80d8
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant