[llvm] [NFC] Reduce copies created of ConstantRange when getting ConstantRangeAttributes. (PR #90335)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 30 23:16:41 PDT 2024
================
@@ -71,8 +71,8 @@ class Argument final : public Value {
FPClassTest getNoFPClass() const;
/// If this argument has a range attribute, return the value range of the
- /// argument. Otherwise, std::nullopt is returned.
- std::optional<ConstantRange> getRange() const;
+ /// argument. Otherwise, nullptr is returned.
+ const ConstantRange *getRange() const;
----------------
nikic wrote:
I'd prefer to leave this alone as well, to keep the APIs consistent.
https://github.com/llvm/llvm-project/pull/90335
More information about the llvm-commits
mailing list