[PATCH] D148042: [MSP430] Get the DWARF pointer size from MCAsmInfo instead of DataLayout.

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 18 14:17:30 PDT 2023


dblaikie added a comment.

What's the difference between these two things? (like, why are they different for MSP430? I guess the data layout represents how big a pointer is in a struct, but what does the "code pointer size" represent/why is it the right answer?)

Equally/also, this seems like an lldb bug that could be fixed there, though arguably we would want to emit it the same as GCC for GDB compatibility anyway (if GDB can't cope with the 2 byte pointers already - have you tested that?).

Also there's a few codepaths that include assertions about pointer sizes being 4 or 8 bytes, so they'd presumably have resulted in crashes for MSP430 before? So sounds like those codepaths are untested, and perhaps should be tested? (could you add that test coverage?) & maybe it'd be good to unify all the callers so this is only done in one place instead of 5?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D148042



More information about the llvm-commits mailing list