[PATCH] D58811: [clang] Fix misuses of char width to char align
Aleksandr Malykh via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 5 23:20:04 PST 2019
amalykh added a comment.
> Could you clarify the characteristics of your target?
Yeah, sure.
The target supports only word addressing when it comes to loading from memory or storing to memory, that's why types shorter than 4 bytes need to be aligned by at least 4.
In order to achieve this, getCharAlign and getShortAlign functions and some llvm passes have been modified to work with such kind of layout.
> The C standard requires that both `alignof(char)` and `sizeof(char)` must equal 1, and therefore must equal each other
Currently we are targeting C99 language standard, which, as far as I know, says nothing about `alignof` keyword. Anyway, thanks for pointing that out.
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D58811/new/
https://reviews.llvm.org/D58811
More information about the cfe-commits
mailing list