Hi, while using this function I noticed that Type::getScalarSizeInBits() is not marked as const even if inside its body it just uses only other "const" functions and types.
This prevents the usage of the function through const pointers/references to Type without any apparent reason.
I propose of marking the function as const. (attached is a patch that does so).
llvm_scalar_size_const.patch (1.1 KB)