llvm / llvm/llvm-project

Remove implicit TypeSize to uint64_t conversion

Open
#159,290 0 comments 0 reactions 0 assignees View on GitHub
code-cleanup llvm:ir
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

TypeSize currently has an implicit conversion to integer, which will assert if the type is scalable. This conversion is discouraged, but not formally deprecated, so it's easy to accidentally use it and cause runtime errors if scalable vectors are used. We should remove this conversion in favor of getFixedValue() and getKnownMinValue().

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.