The std::optional returned by buildPromotedAlloc was directly dereferenced and assumed to be non-null, even though the documentation for AllocationOpInterface indicates that std::nullopt is a legal value if buffer stack promotion is not supported (and is the default value supplied by the TableGen interface file). This patch removes the direct dereference so that the optional can be null-checked prior to use. Co-authored-by: Nikhil Kalra <nkalra@apple.com>
20 KiB
20 KiB