]> granicus.if.org Git - llvm/commitdiff
DWARFDebugInfoTest.cpp: Don't use ArrayRef with initializer. It was allocated locally.
authorNAKAMURA Takumi <geek4civic@gmail.com>
Mon, 16 Jan 2017 14:33:37 +0000 (14:33 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Mon, 16 Jan 2017 14:33:37 +0000 (14:33 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@292127 91177308-0d34-0410-b5e6-96231b3b80d8

unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp

index 5c9febd18905ec289f6809d6f94dbcf292f5ca58..8cf4e56b0a30a363a25e16b56c0a7841a14e9e7a 100644 (file)
@@ -1527,9 +1527,9 @@ TEST(DWARFDebugInfo, TestFindAttrs) {
   // in the DIE returns nothing.
   EXPECT_FALSE(FuncDie.find({DW_AT_low_pc, DW_AT_entry_pc}).hasValue());
 
-  ArrayRef<dwarf::Attribute>
-      Attrs = { DW_AT_linkage_name, DW_AT_MIPS_linkage_name };
-  
+  const dwarf::Attribute Attrs[] = {DW_AT_linkage_name,
+                                    DW_AT_MIPS_linkage_name};
+
   // Make sure we can't extract the linkage name attributes when using
   // DWARFDie::find() since it won't check the DW_AT_specification DIE.
   EXPECT_FALSE(FuncDie.find(Attrs).hasValue());