[CGBuilder] Assert that CreateAddrSpaceCast does not change element type
authorNikita Popov <npopov@redhat.com>
Wed, 16 Feb 2022 13:59:42 +0000 (14:59 +0100)
committerNikita Popov <npopov@redhat.com>
Wed, 16 Feb 2022 14:17:08 +0000 (15:17 +0100)
commitfe3407a91b6dcc1100c0b30187aa8c9587c73cad
tree18471de8ba77c1caa4c9ceedccbfc3a2995f30d8
parent483ae099f0e729aaae6ed397ccbc67de8849d729
[CGBuilder] Assert that CreateAddrSpaceCast does not change element type

Address space casts in general may change the element type, but
don't allow it in the method working on Address, so we can
preserve the element type.

CreatePointerBitCastOrAddrSpaceCast() still needs to be addressed.
clang/lib/CodeGen/CGBuilder.h
clang/lib/CodeGen/CGExpr.cpp