[PATCH] D100015: [debug-info] make fortran CHARACTER(1) type as valid unsigned type
ChenZheng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 28 02:12:44 PDT 2021
shchenz added inline comments.
================
Comment at: llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp:180
+ if (isa<DIStringType>(Ty)) {
+ assert((Ty->getSizeInBits()) == 8 && "Not a valid unsigned type!");
+ return true;
----------------
LiuChen3 wrote:
> Hi, @shchenz . This assertion make our testcase fail on X86 target. I am not familiar with this part so I have a question here: why the type here must be unsigned? Should this be something like "return Ty->getSizeInBits() == 8; " ?
> Thanks.
I added this assertion only for `i8` is because SROA will convert Fortran `CHARACTER(1)` type (`DIStringType`) to `i8`. Do you also get some ` DIStringType` variables being converted to a scalar type, like `i8`, `i16`, `i32`? If so, I think you need to first check if the above conversion is valid or not. if it is valid, then you can change the assertion here.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D100015/new/
https://reviews.llvm.org/D100015
More information about the llvm-commits
mailing list