diff options
author | Andreas Jonson <andjo403@hotmail.com> | 2024-05-02 03:48:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-02 10:48:23 +0900 |
commit | 3d65bd935a91439c483c56a966edc283a2b1130d (patch) | |
tree | 59ce1bce993cc94b235595ec267c80e4b334c6a9 /llvm/lib/IR/Verifier.cpp | |
parent | ad7ee900c70ba4e8dd442b35cddf390369698a59 (diff) | |
download | llvm-3d65bd935a91439c483c56a966edc283a2b1130d.zip llvm-3d65bd935a91439c483c56a966edc283a2b1130d.tar.gz llvm-3d65bd935a91439c483c56a966edc283a2b1130d.tar.bz2 |
[NFC] Reduce copies created of ConstantRange when getting ConstantRangeAttributes (#90335)
Think that it can be good to reduce the number of copies created when
working with ConstantRangeAttributes.
Diffstat (limited to 'llvm/lib/IR/Verifier.cpp')
-rw-r--r-- | llvm/lib/IR/Verifier.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp index 16ed167..41d3fce 100644 --- a/llvm/lib/IR/Verifier.cpp +++ b/llvm/lib/IR/Verifier.cpp @@ -2065,7 +2065,8 @@ void Verifier::verifyParameterAttrs(AttributeSet Attrs, Type *Ty, "Invalid value for 'nofpclass' test mask", V); } if (Attrs.hasAttribute(Attribute::Range)) { - auto CR = Attrs.getAttribute(Attribute::Range).getValueAsConstantRange(); + const ConstantRange &CR = + Attrs.getAttribute(Attribute::Range).getValueAsConstantRange(); Check(Ty->isIntOrIntVectorTy(CR.getBitWidth()), "Range bit width must match type bit width!", V); } |