brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.1 KiB · 6e8e720 Raw
70 lines · plain
1; REQUIRES: x86-registered-target2 3; Ignored attributes with DW_FORM_implicit_const.4; https://github.com/llvm/llvm-project/issues/570405 6; Output generated by g++ (Debian 11.3.0-3) 11.3.07 8; .debug_abbrev contents:9; [1] DW_TAG_formal_parameter     DW_CHILDREN_no10;         DW_AT_decl_file DW_FORM_implicit_const  111;         DW_AT_decl_line DW_FORM_implicit_const  212 13; [2] DW_TAG_typedef      DW_CHILDREN_no14;         DW_AT_decl_file DW_FORM_implicit_const  115;         DW_AT_decl_line DW_FORM_data116 17; Attributes with DW_FORM_implicit_const being ignored by the DWARFReader,18; causing {Parameter} and {TypeAlias} to omit line numbers.19 20; test.cpp21;  1  using INTPTR = const int *;22;  2  int foo(INTPTR ParamPtr, unsigned ParamUnsigned, bool ParamBool) {23;  3    if (ParamBool) {24;  4      typedef int INTEGER;25;  5      const INTEGER CONSTANT = 7;26;  6      return CONSTANT;27;  7    }28;  8    return ParamUnsigned;29;  9  }30 31; RUN: llvm-debuginfo-analyzer --attribute=language,level,format,producer \32; RUN:                         --print=scopes,symbols,types \33; RUN:                         %p/Inputs/pr-57040-test-dwarf-clang.o 2>&1 | \34; RUN: FileCheck --strict-whitespace -check-prefix=ONE %s35 36; ONE:      Logical View:37; ONE-NEXT: [000]           {File} 'pr-57040-test-dwarf-clang.o' -> elf64-x86-6438; ONE-EMPTY:39; ONE-NEXT: [001]             {CompileUnit} 'test.cpp'40; ONE-NEXT: [002]               {Producer} 'clang version 14.0.6'41; ONE-NEXT: [002]               {Language} 'DW_LANG_C_plus_plus_14'42; ONE-NEXT: [002]     1         {TypeAlias} 'INTPTR' -> '* const int'43; ONE-NEXT: [002]     2         {Function} extern not_inlined 'foo' -> 'int'44; ONE-NEXT: [003]                 {Block}45; ONE-NEXT: [004]     5             {Variable} 'CONSTANT' -> 'const INTEGER'46; ONE-NEXT: [003]     2           {Parameter} 'ParamBool' -> 'bool'47; ONE-NEXT: [003]     2           {Parameter} 'ParamPtr' -> 'INTPTR'48; ONE-NEXT: [003]     2           {Parameter} 'ParamUnsigned' -> 'unsigned int'49; ONE-NEXT: [003]     4           {TypeAlias} 'INTEGER' -> 'int'50 51; RUN: llvm-debuginfo-analyzer --attribute=language,level,format,producer \52; RUN:                         --print=scopes,symbols,types \53; RUN:                         %p/Inputs/pr-57040-test-dwarf-gcc.o 2>&1 | \54; RUN: FileCheck --strict-whitespace -check-prefix=TWO %s55 56; TWO:      Logical View:57; TWO-NEXT: [000]           {File} 'pr-57040-test-dwarf-gcc.o' -> elf64-x86-6458; TWO-EMPTY:59; TWO-NEXT: [001]             {CompileUnit} 'test.cpp'60; TWO-NEXT: [002]               {Producer} 'GNU C++17 11.3.0 {{.*}}'61; TWO-NEXT: [002]               {Language} 'DW_LANG_C_plus_plus_14'62; TWO-NEXT: [002]     1         {TypeAlias} 'INTPTR' -> '* const int'63; TWO-NEXT: [002]     2         {Function} extern not_inlined 'foo' -> 'int'64; TWO-NEXT: [003]                 {Block}65; TWO-NEXT: [004]     4             {TypeAlias} 'INTEGER' -> 'int'66; TWO-NEXT: [004]     5             {Variable} 'CONSTANT' -> 'const INTEGER'67; TWO-NEXT: [003]     2           {Parameter} 'ParamBool' -> 'bool'68; TWO-NEXT: [003]     2           {Parameter} 'ParamPtr' -> 'INTPTR'69; TWO-NEXT: [003]     2           {Parameter} 'ParamUnsigned' -> 'unsigned int'70