[PATCH] D115982: [clang][AVR] Implement '__flashN' for variables on different flash banks
Ben Shi via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Jan 19 02:21:23 PST 2022
benshi001 marked an inline comment as done.
benshi001 added inline comments.
Comment at: clang/lib/Basic/Targets/AVR.cpp:27
const char *DefineName;
+ const int MaxFlashBank; // -1 means the device does not support LPM/ELPM.
> This works and is fine, but I think you could also name it `NumFlashBanks` so that it is the number of flash banks supported on the device (0 if LPM/ELPM is not supported). With 0 for the attiny11 (which has no accessible flash banks) and 1 for the attiny22 (because it has only one flash bank that can be accessed: flash bank 0).
> Just a suggestion, the current system looks good to me.
I will change it to NumFlashBanks when committing.
CHANGES SINCE LAST ACTION
More information about the cfe-commits