brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · 17e6a4d Raw
30 lines · plain
1; REQUIRES: x86-registered-target2 3; dw-at-specification.cpp4; 1  struct S {5; 2      static const int Arr[];6; 3  };7; 4  const int S::Arr[] = {8; 5      0, 1, 29; 6  };10 11; The above test compiled with clang++ produces both a DW_AT_type and12; DW_AT_specification on the definition die for S::Arr, which previously caused13; an assert in the LVDWARFReader:14; $ clang++ -g -c dw-at-specification.cpp -o dw-at-specification.o15 16; RUN: llvm-debuginfo-analyzer --attribute=level,format,producer,size \17; RUN:                         --output-sort=name \18; RUN:                         --print=symbols \19; RUN:                         %p/Inputs/dw-at-specification.o 2>&1 | \20; RUN: FileCheck --strict-whitespace -check-prefix=CHECK %s21 22; CHECK: Logical View:23; CHECK: [000]           {File} 'dw-at-specification.o' -> elf64-x86-6424; CHECK-EMPTY:25; CHECK: [001]             {CompileUnit} 'a.cpp'26; CHECK: [002]               {Producer} 'clang version 11.0.0 ({{.*}})'27; CHECK: [002]               {Variable} 'Arr' -> 'const int [3]'28; CHECK: [002]     1         {Struct} 'S' [Size = 1]29; CHECK: [003]     2           {Member} extern public 'Arr' -> 'const int [1]'30