From fcf31a73d18ed5055ee79009e8d5fcfdc21a8b3c Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Fri, 6 Jun 2014 18:45:14 +0000 Subject: [PATCH] Match the full hex offsets in test/DebugInfo/X86/gnu-public-names.ll These checks were accidentally skipping the 0x prefix in the hex offsets, then cunningly ignoring the prefix in the use of those captured values. Except in the case of the unit length, where the match was only matching the leading '0' before the x in the 0x prefix, then matching that against the length. We can't actually express the length association here, as the length field in the Compile Unit header does not include the length field itself, but the length field in the pubnames section /does/ include the size of the length field in the Compile Unit header - so the two numbers are actually 4 bytes different. Just skip matching that. llvm-svn: 210364 --- llvm/test/DebugInfo/X86/gnu-public-names.ll | 48 ++++++++++++++--------------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/llvm/test/DebugInfo/X86/gnu-public-names.ll b/llvm/test/DebugInfo/X86/gnu-public-names.ll index f08977a..6a3d659 100644 --- a/llvm/test/DebugInfo/X86/gnu-public-names.ll +++ b/llvm/test/DebugInfo/X86/gnu-public-names.ll @@ -45,73 +45,73 @@ ; ASM-NEXT: .asciz "C" # External Name ; CHECK: .debug_info contents: -; CHECK: Compile Unit: length = [[UNIT_SIZE:[0-9a-f]+]] +; CHECK: Compile Unit: ; CHECK: DW_AT_GNU_pubnames [DW_FORM_flag_present] (true) ; CHECK-NOT: DW_AT_GNU_pubtypes [ -; CHECK: [[C:[0-9a-f]+]]: DW_TAG_structure_type +; CHECK: [[C:0x[0-9a-f]+]]: DW_TAG_structure_type ; CHECK-NEXT: DW_AT_name {{.*}} "C" -; CHECK: [[STATIC_MEM_DECL:[0-9a-f]+]]: DW_TAG_member +; CHECK: [[STATIC_MEM_DECL:0x[0-9a-f]+]]: DW_TAG_member ; CHECK-NEXT: DW_AT_name {{.*}} "static_member_variable" -; CHECK: [[MEM_FUNC_DECL:[0-9a-f]+]]: DW_TAG_subprogram +; CHECK: [[MEM_FUNC_DECL:0x[0-9a-f]+]]: DW_TAG_subprogram ; CHECK-NEXT: DW_AT_MIPS_linkage_name ; CHECK-NEXT: DW_AT_name {{.*}} "member_function" -; CHECK: [[STATIC_MEM_FUNC_DECL:[0-9a-f]+]]: DW_TAG_subprogram +; CHECK: [[STATIC_MEM_FUNC_DECL:0x[0-9a-f]+]]: DW_TAG_subprogram ; CHECK-NEXT: DW_AT_MIPS_linkage_name ; CHECK-NEXT: DW_AT_name {{.*}} "static_member_function" -; CHECK: [[INT:[0-9a-f]+]]: DW_TAG_base_type +; CHECK: [[INT:0x[0-9a-f]+]]: DW_TAG_base_type ; CHECK-NEXT: DW_AT_name {{.*}} "int" -; CHECK: [[STATIC_MEM_VAR:[0-9a-f]+]]: DW_TAG_variable -; CHECK-NEXT: DW_AT_specification {{.*}}[[STATIC_MEM_DECL]] +; CHECK: [[STATIC_MEM_VAR:0x[0-9a-f]+]]: DW_TAG_variable +; CHECK-NEXT: DW_AT_specification {{.*}} {[[STATIC_MEM_DECL]]} -; CHECK: [[GLOB_VAR:[0-9a-f]+]]: DW_TAG_variable +; CHECK: [[GLOB_VAR:0x[0-9a-f]+]]: DW_TAG_variable ; CHECK-NEXT: DW_AT_name {{.*}} "global_variable" -; CHECK: [[NS:[0-9a-f]+]]: DW_TAG_namespace +; CHECK: [[NS:0x[0-9a-f]+]]: DW_TAG_namespace ; CHECK-NEXT: DW_AT_name {{.*}} "ns" -; CHECK: [[GLOB_NS_VAR_DECL:[0-9a-f]+]]: DW_TAG_variable +; CHECK: [[GLOB_NS_VAR_DECL:0x[0-9a-f]+]]: DW_TAG_variable ; CHECK-NEXT: DW_AT_name {{.*}} "global_namespace_variable" -; CHECK: [[D_VAR_DECL:[0-9a-f]+]]: DW_TAG_variable +; CHECK: [[D_VAR_DECL:0x[0-9a-f]+]]: DW_TAG_variable ; CHECK-NEXT: DW_AT_name {{.*}} "d" -; CHECK: [[D:[0-9a-f]+]]: DW_TAG_structure_type +; CHECK: [[D:0x[0-9a-f]+]]: DW_TAG_structure_type ; CHECK-NEXT: DW_AT_name {{.*}} "D" -; CHECK: [[GLOB_NS_FUNC:[0-9a-f]+]]: DW_TAG_subprogram +; CHECK: [[GLOB_NS_FUNC:0x[0-9a-f]+]]: DW_TAG_subprogram ; CHECK-NOT: DW_TAG ; CHECK: DW_AT_MIPS_linkage_name ; CHECK-NOT: DW_TAG ; CHECK: DW_AT_name {{.*}} "global_namespace_function" -; CHECK: [[GLOB_NS_VAR:[0-9a-f]+]]: DW_TAG_variable -; CHECK-NEXT: DW_AT_specification {{.*}}[[GLOB_NS_VAR_DECL]] +; CHECK: [[GLOB_NS_VAR:0x[0-9a-f]+]]: DW_TAG_variable +; CHECK-NEXT: DW_AT_specification {{.*}} {[[GLOB_NS_VAR_DECL]]} -; CHECK: [[D_VAR:[0-9a-f]+]]: DW_TAG_variable -; CHECK-NEXT: DW_AT_specification {{.*}}[[D_VAR_DECL]] +; CHECK: [[D_VAR:0x[0-9a-f]+]]: DW_TAG_variable +; CHECK-NEXT: DW_AT_specification {{.*}} {[[D_VAR_DECL]]} -; CHECK: [[MEM_FUNC:[0-9a-f]+]]: DW_TAG_subprogram +; CHECK: [[MEM_FUNC:0x[0-9a-f]+]]: DW_TAG_subprogram ; CHECK-NOT: DW_TAG -; CHECK: DW_AT_specification {{.*}}[[MEM_FUNC_DECL]] +; CHECK: DW_AT_specification {{.*}} {[[MEM_FUNC_DECL]]} -; CHECK: [[STATIC_MEM_FUNC:[0-9a-f]+]]: DW_TAG_subprogram +; CHECK: [[STATIC_MEM_FUNC:0x[0-9a-f]+]]: DW_TAG_subprogram ; CHECK-NOT: DW_TAG -; CHECK: DW_AT_specification {{.*}}[[STATIC_MEM_FUNC_DECL]] +; CHECK: DW_AT_specification {{.*}} {[[STATIC_MEM_FUNC_DECL]]} -; CHECK: [[GLOBAL_FUNC:[0-9a-f]+]]: DW_TAG_subprogram +; CHECK: [[GLOBAL_FUNC:0x[0-9a-f]+]]: DW_TAG_subprogram ; CHECK-NOT: DW_TAG ; CHECK: DW_AT_MIPS_linkage_name ; CHECK-NOT: DW_TAG ; CHECK: DW_AT_name {{.*}} "global_function" ; CHECK-LABEL: .debug_gnu_pubnames contents: -; CHECK-NEXT: length = {{.*}} version = 0x0002 unit_offset = 0x00000000 unit_size = [[UNIT_SIZE]] +; CHECK-NEXT: length = {{.*}} version = 0x0002 unit_offset = 0x00000000 unit_size = {{.*}} ; CHECK-NEXT: Offset Linkage Kind Name ; CHECK-DAG: [[GLOBAL_FUNC]] EXTERNAL FUNCTION "global_function" ; CHECK-DAG: [[NS]] EXTERNAL TYPE "ns" -- 2.7.4