aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/DirectX/DirectXTargetMachine.cpp
diff options
context:
space:
mode:
authorjeanPerier <jperier@nvidia.com>2024-06-24 10:21:04 +0200
committerGitHub <noreply@github.com>2024-06-24 10:21:04 +0200
commit73cf014223fed1947f725f7debcf19b8f54448b5 (patch)
tree95874478a5f4452ff5e99d83e6755326ec86a34d /llvm/lib/Target/DirectX/DirectXTargetMachine.cpp
parent33676ba543737f8e286e28a9cae81a848bdd3f09 (diff)
downloadllvm-73cf014223fed1947f725f7debcf19b8f54448b5.zip
llvm-73cf014223fed1947f725f7debcf19b8f54448b5.tar.gz
llvm-73cf014223fed1947f725f7debcf19b8f54448b5.tar.bz2
[flang] harden TypeAndShape for assumed-ranks (#96234)
SIZEOF and C_SIZEOF were broken for assumed-ranks because `TypeAndShape::MeasureSizeInBytes` behaved as a scalar because the `TypeAndShape::shape_` member was the same for scalar and assumed-ranks. The easy fix would have been to add special handling in `MeasureSizeInBytes` for assumed-ranks using the TypeAndShape attributes, but I think this solution would leave `TypeAndShape::shape_` manipulation fragile to future developers. Hence, I went for the solution that turn shape_ into a `std::optional<Shape>`.
Diffstat (limited to 'llvm/lib/Target/DirectX/DirectXTargetMachine.cpp')
0 files changed, 0 insertions, 0 deletions