https://reviews.llvm.org/D146097 removed the transitive include for
<exception>, which caused the following issue:
In file included from ../../third_party/spirv-cross/spirv_common.hpp:28:
../../third_party/spirv-cross/spirv_cross_containers.hpp:334:9: error:
no member named 'terminate' in namespace 'std
This patch adds the missing include to fix the issue.
This op creates a new composite constant with one element replaced. So,
we reconstruct the `SPIRConstant` for the composite constant, but with
one of the IDs replaced. Constant initializer lists are memoized for
when the result of a `CompositeInsert` is used in another
`CompositeInsert`.
(I wanted to add a test case for GLSL as well, but for two things:
1. `glslang` in Vulkan mode chokes on the first constant array,
insisting that its initializer needs to be a constant. [Bug in
glslang?]
2. The declarations for the buffers used by the shader aren't emitted,
regardless of whether Vulkan mode is enabled.)
Fixes five tests under
`dEQP-VK.spirv_assembly.instruction.*.opspecconstantop.vector_related`.
Fixes a linting error from cppcheck where reserve() calls can throw, but
caller is marked noexcept to allow proper move semantics.
Only real place to throw would be if allocations fail, but these
allocations tend to be small, and if allocation actually fails here,
we're basically OOM anyways, so just terminate. Constructors and assignment
could also fail, but the only way that could happen is memory related in
SPIRV-Cross' case, so just terminate if that happens as well.
Also, for good measure, add missing -fno-exceptions to EXCEPTIONS_TO_ASSERTIONS
path in CMake.