[PATCH] D86629: [AVR][clang] Pass the address of the data section to the linker for ATmega328

Ayke via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 21 12:18:53 PDT 2020


aykevl added a comment.

Looks reasonable to me, although I can't really comment on the contents of this as I'm not very familiar with this code.

I would like to see just a single MCU table that contains all the information (including start addresses). Maybe it can even be generated from ATDF files (http://packs.download.atmel.com/), at least the first time. However, this is a good start (not least because now it warns when producing invalid binaries).



================
Comment at: clang/lib/Driver/ToolChains/AVR.cpp:40
 
+llvm::Optional<unsigned> GetMcuSectionAddressData(StringRef MCU) {
+  return llvm::StringSwitch<llvm::Optional<unsigned>>(MCU)
----------------
I don't think the LLVM coding style says something about this, but coming from Go I'm more used to capitalized abbreviations (`MCU`, `GetMCUSectionAddressData`).

However, this is just a superficial thing, feel free to ignore.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D86629/new/

https://reviews.llvm.org/D86629



More information about the cfe-commits mailing list