[llvm] Replacing asserts with static_asserts where appropriate