[PATCH] D139395: Add CFI integer types normalization
Ramon de C Valle via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 12 19:26:11 PST 2022
rcvalle added inline comments.
================
Comment at: clang/lib/AST/ItaniumMangle.cpp:2952
+ // u<length>u<type size>
+ if (NormalizeIntegers && T->isInteger()) {
+ if (T->isSignedInteger()) {
----------------
pcc wrote:
> `isInteger()` will return true for enums, but only if they are complete. This would mean that code such as
> ```
> void (*f)(enum E *e);
>
> void g() {
> f(0);
> }
> ```
> would use a different encoding to call `f` depending on whether the TU completes the enum `E`, if pointee types are considered part of the encoding.
Isn't `isIntegerType()` that does that? `isInteger()` definition is:
```
bool isInteger() const {
return getKind() >= Bool && getKind() <= Int128;
}
```
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139395/new/
https://reviews.llvm.org/D139395
More information about the cfe-commits
mailing list