[llvm] [IR][Attribute] Don't create dangling references (PR #110781)

via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 1 19:01:17 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-llvm-ir

Author: Vitaly Buka (vitalybuka)

<details>
<summary>Changes</summary>

Fix #<!-- -->109719.


---
Full diff: https://github.com/llvm/llvm-project/pull/110781.diff


1 Files Affected:

- (modified) llvm/unittests/IR/AttributesTest.cpp (+2-2) 


``````````diff
diff --git a/llvm/unittests/IR/AttributesTest.cpp b/llvm/unittests/IR/AttributesTest.cpp
index b713cd38d2f51d..0fdb5a9c5a6886 100644
--- a/llvm/unittests/IR/AttributesTest.cpp
+++ b/llvm/unittests/IR/AttributesTest.cpp
@@ -447,8 +447,8 @@ TEST(Attributes, SetIntersect) {
 
     ConstantRange CR0(APInt(32, 0), APInt(32, 10));
     ConstantRange CR1(APInt(32, 15), APInt(32, 20));
-    ArrayRef<ConstantRange> CRL0 = {CR0};
-    ArrayRef<ConstantRange> CRL1 = {CR0, CR1};
+    ConstantRange CRL0[] = {CR0};
+    ConstantRange CRL1[] = {CR0, CR1};
     Type *T0 = Type::getInt32Ty(C0);
     Type *T1 = Type::getInt64Ty(C0);
     Attribute Attr0 = BuildAttr(C0, Kind, V0, T0, CR0, CRL0);

``````````

</details>


https://github.com/llvm/llvm-project/pull/110781


More information about the llvm-commits mailing list