brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.9 KiB · 5f2b3f9 Raw
52 lines · plain
1; REQUIRES: x86-registered-target2 3; For the given test case:4 5; // ThreadLocalStorage.cpp6; 1 thread_local int TGlobal = 0;7; 2 int NGlobal = 1;8; 3 void test() {9; 4   thread_local int TLocal = 0;10; 5   TGlobal = 1;11; 612; 7   int NLocal = 0;13; 8   NGlobal = 2;14; 9 }15 16; The llvm-debuginfo-analyzer crashes when producing a logical view for17; the object file generated using the following commands:18;19; clang++ -Xclang -disable-O0-optnone -Xclang -disable-llvm-passes20;         -fno-discard-value-names -emit-llvm -S -g -O021;         ThreadLocalStorage.cpp -o ThreadLocalStorage.ll22; llc --filetype=obj ThreadLocalStorage.ll -o ThreadLocalStorage.o23;24; llvm-debuginfo-analyzer --attribute=location --print=symbols25;                         ThreadLocalStorage.o26 27; RUN: llc --filetype=obj \28; RUN:     %p/Inputs/ThreadLocalStorage.ll -o %t.ThreadLocalStorage.o29 30; RUN: llvm-debuginfo-analyzer --attribute=location \31; RUN:                         --print=symbols \32; RUN:                         %t.ThreadLocalStorage.o 2>&1 | \33; RUN: FileCheck --strict-whitespace %s34 35; CHECK: Logical View:36; CHECK:            {File} '{{.*}}threadlocalstorage.o'37; CHECK-EMPTY:38; CHECK:              {CompileUnit} 'threadlocalstorage.cpp'39; CHECK:      1         {Variable} extern 'TGlobal' -> 'int'40; CHECK:                  {Location}41; CHECK:                    {Entry} const_u 0, gnu_push_tls_address42; CHECK:      2         {Variable} extern 'NGlobal' -> 'int'43; CHECK:                  {Location}44; CHECK:                    {Entry} addrx 045; CHECK:      3         {Function} extern not_inlined 'test' -> 'void'46; CHECK:      4           {Variable} 'TLocal' -> 'int'47; CHECK:                    {Location}48; CHECK:                      {Entry} const_u 0, gnu_push_tls_address49; CHECK:      7           {Variable} 'NLocal' -> 'int'50; CHECK:                    {Location}51; CHECK:                      {Entry} fbreg -452