Integers might not be 32 bits wide, so check the TargetInfo for their size.
Details
Diff Detail
Event Timeline
LGTM as far as the changes go, but did have a question about whether we need this for unsigned values as well.
clang/lib/AST/Interp/InterpBuiltin.cpp | ||
---|---|---|
36 | Do we need the same for unsigned int as well? (I'm thinking in terms of pushing literal values like 0U) |
clang/lib/AST/Interp/InterpBuiltin.cpp | ||
---|---|---|
36 | Theoretically yes, but all the ints we're pushing right now are signed AFAICS. |
This patch is missing the Ret<PT_Sint32> part in InterpBuiltin() in the same file. That needs to change to the correct type as well.
I can do that in a follow-up commit. @aaron.ballman Can you come up with a value I can pass to -triple so I can actually test that this works?
Oops, sorry on the delayed response, this one slipped under my radar. You should be able to use avr-unknown-unknown: https://godbolt.org/z/4TsPW41d5
Breaks the bot https://lab.llvm.org/buildbot/#/builders/74/builds/21336/steps/13/logs/stdio
Please take a look or revert?
Note: msan_track_origins step may have useful details.
Wow, sorry. That was too late in my day. I have a pretty good idea of why it's failing but I'll try to reproduce with an msan enabled build.
Do we need the same for unsigned int as well? (I'm thinking in terms of pushing literal values like 0U)