[Attributes] Return Optional from getAllocSizeArgs() (NFC)
authorNikita Popov <npopov@redhat.com>
Tue, 11 Oct 2022 09:01:29 +0000 (11:01 +0200)
committerNikita Popov <npopov@redhat.com>
Tue, 11 Oct 2022 09:05:21 +0000 (11:05 +0200)
commitac47db6acad29b6e077593430338be69d81cb6c0
treec2d7da6151e4cb0961111d8cf0d7fec2f9477e56
parent256976774f6d41a6f851e5e1dd2da2fddad1377e
[Attributes] Return Optional from getAllocSizeArgs() (NFC)

As suggested on D135572, return Optional<> from getAllocSizeArgs()
rather than the peculiar pair(0, 0) sentinel.

The method on Attribute itself does not return Optional, because
the attribute must exist in that case.
llvm/include/llvm/IR/Attributes.h
llvm/lib/IR/AttributeImpl.h
llvm/lib/IR/Attributes.cpp
llvm/lib/IR/Verifier.cpp
llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp