mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-26 23:32:58 +00:00
Replace test case that uses @llvm.dbg.* intrinsic with a test that uses metadata.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@97473 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5520ad4dd9
commit
1e19cf635d
@ -1,62 +0,0 @@
|
||||
; RUN: llc %s -o - -O0 | grep "label" | count 8
|
||||
; PR2614
|
||||
; XFAIL: *
|
||||
|
||||
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-f80:32:32-v64:64:64-v128:128:128-a0:0:64"
|
||||
target triple = "i686-pc-linux-gnu"
|
||||
%llvm.dbg.anchor.type = type { i32, i32 }
|
||||
%llvm.dbg.basictype.type = type { i32, { }*, i8*, { }*, i32, i64, i64, i64, i32, i32 }
|
||||
%llvm.dbg.compile_unit.type = type { i32, { }*, i32, i8*, i8*, i8* }
|
||||
%llvm.dbg.compositetype.type = type { i32, { }*, i8*, { }*, i32, i64, i64, i64, i32, { }*, { }* }
|
||||
%llvm.dbg.derivedtype.type = type { i32, { }*, i8*, { }*, i32, i64, i64, i64, i32, { }* }
|
||||
%llvm.dbg.global_variable.type = type { i32, { }*, { }*, i8*, i8*, i8*, { }*, i32, { }*, i1, i1, { }* }
|
||||
%llvm.dbg.subprogram.type = type { i32, { }*, { }*, i8*, i8*, i8*, { }*, i32, { }*, i1, i1 }
|
||||
%llvm.dbg.variable.type = type { i32, { }*, i8*, { }*, i32, { }* }
|
||||
@llvm.dbg.compile_units = linkonce constant %llvm.dbg.anchor.type { i32 393216, i32 17 }, section "llvm.metadata" ; <%llvm.dbg.anchor.type*> [#uses=1]
|
||||
@llvm.dbg.global_variables = linkonce constant %llvm.dbg.anchor.type { i32 393216, i32 52 }, section "llvm.metadata" ; <%llvm.dbg.anchor.type*> [#uses=0]
|
||||
@llvm.dbg.subprograms = linkonce constant %llvm.dbg.anchor.type { i32 393216, i32 46 }, section "llvm.metadata" ; <%llvm.dbg.anchor.type*> [#uses=1]
|
||||
@.str = internal constant [17 x i8] c"deaddebuglabel.d\00", section "llvm.metadata" ; <[17 x i8]*> [#uses=1]
|
||||
@.str1 = internal constant [50 x i8] c"/home/kamm/eigenes/projekte/llvmdc/llvmdc/mytests\00", section "llvm.metadata" ; <[50 x i8]*> [#uses=1]
|
||||
@.str2 = internal constant [48 x i8] c"LLVMDC (http://www.dsource.org/projects/llvmdc)\00", section "llvm.metadata" ; <[48 x i8]*> [#uses=1]
|
||||
@llvm.dbg.compile_unit = internal constant %llvm.dbg.compile_unit.type {
|
||||
i32 393233,
|
||||
{ }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.compile_units to { }*),
|
||||
i32 2,
|
||||
i8* getelementptr ([17 x i8]* @.str, i32 0, i32 0),
|
||||
i8* getelementptr ([50 x i8]* @.str1, i32 0, i32 0),
|
||||
i8* getelementptr ([48 x i8]* @.str2, i32 0, i32 0) }, section "llvm.metadata" ; <%llvm.dbg.compile_unit.type*> [#uses=1]
|
||||
@.str5 = internal constant [20 x i8] c"deaddebuglabel.main\00", section "llvm.metadata" ; <[20 x i8]*> [#uses=1]
|
||||
@.str6 = internal constant [5 x i8] c"main\00", section "llvm.metadata" ; <[5 x i8]*> [#uses=1]
|
||||
@llvm.dbg.subprogram7 = internal constant %llvm.dbg.subprogram.type {
|
||||
i32 393262,
|
||||
{ }* bitcast (%llvm.dbg.anchor.type* @llvm.dbg.subprograms to { }*),
|
||||
{ }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*),
|
||||
i8* getelementptr ([20 x i8]* @.str5, i32 0, i32 0),
|
||||
i8* getelementptr ([20 x i8]* @.str5, i32 0, i32 0),
|
||||
i8* getelementptr ([5 x i8]* @.str6, i32 0, i32 0),
|
||||
{ }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*),
|
||||
i32 3,
|
||||
{ }* null,
|
||||
i1 false,
|
||||
i1 true }, section "llvm.metadata" ; <%llvm.dbg.subprogram.type*> [#uses=1]
|
||||
|
||||
declare void @llvm.dbg.func.start({ }*) nounwind
|
||||
|
||||
declare void @llvm.dbg.stoppoint(i32, i32, { }*) nounwind
|
||||
|
||||
declare void @llvm.dbg.region.end({ }*) nounwind
|
||||
|
||||
define fastcc i32 @main() {
|
||||
entry.main:
|
||||
call void @llvm.dbg.func.start( { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram7 to { }*) )
|
||||
br i1 true, label %reachable, label %unreachable
|
||||
|
||||
reachable: ; preds = %entry.main
|
||||
call void @llvm.dbg.region.end( { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram7 to { }*) )
|
||||
ret i32 1
|
||||
|
||||
unreachable: ; preds = %entry.main
|
||||
call void @llvm.dbg.stoppoint( i32 7, i32 0, { }* bitcast (%llvm.dbg.compile_unit.type* @llvm.dbg.compile_unit to { }*) )
|
||||
call void @llvm.dbg.region.end( { }* bitcast (%llvm.dbg.subprogram.type* @llvm.dbg.subprogram7 to { }*) )
|
||||
ret i32 0
|
||||
}
|
151
test/DebugInfo/inheritance.ll
Normal file
151
test/DebugInfo/inheritance.ll
Normal file
@ -0,0 +1,151 @@
|
||||
; RUN: llc %s -o /dev/null
|
||||
; PR 2613.
|
||||
|
||||
%struct.__class_type_info_pseudo = type { %struct.__type_info_pseudo }
|
||||
%struct.__type_info_pseudo = type { i8*, i8* }
|
||||
%struct.test1 = type { i32 (...)** }
|
||||
|
||||
@_ZTV5test1 = weak_odr constant [4 x i32 (...)*] [i32 (...)* null, i32 (...)* bitcast (%struct.__class_type_info_pseudo* @_ZTI5test1 to i32 (...)*), i32 (...)* bitcast (void (%struct.test1*)* @_ZN5test1D1Ev to i32 (...)*), i32 (...)* bitcast (void (%struct.test1*)* @_ZN5test1D0Ev to i32 (...)*)], align 32 ; <[4 x i32 (...)*]*> [#uses=1]
|
||||
@_ZTI5test1 = weak_odr constant %struct.__class_type_info_pseudo { %struct.__type_info_pseudo { i8* inttoptr (i64 add (i64 ptrtoint ([0 x i32 (...)*]* @_ZTVN10__cxxabiv117__class_type_infoE to i64), i64 16) to i8*), i8* getelementptr inbounds ([7 x i8]* @_ZTS5test1, i64 0, i64 0) } }, align 16 ; <%struct.__class_type_info_pseudo*> [#uses=1]
|
||||
@_ZTVN10__cxxabiv117__class_type_infoE = external constant [0 x i32 (...)*] ; <[0 x i32 (...)*]*> [#uses=1]
|
||||
@_ZTS5test1 = weak_odr constant [7 x i8] c"5test1\00" ; <[7 x i8]*> [#uses=2]
|
||||
|
||||
define i32 @main() nounwind ssp {
|
||||
entry:
|
||||
%retval = alloca i32 ; <i32*> [#uses=2]
|
||||
%0 = alloca i32 ; <i32*> [#uses=2]
|
||||
%tst = alloca %struct.test1 ; <%struct.test1*> [#uses=1]
|
||||
%"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
|
||||
call void @llvm.dbg.declare(metadata !{%struct.test1* %tst}, metadata !0), !dbg !21
|
||||
call void @_ZN5test1C1Ev(%struct.test1* %tst) nounwind, !dbg !22
|
||||
store i32 0, i32* %0, align 4, !dbg !23
|
||||
%1 = load i32* %0, align 4, !dbg !23 ; <i32> [#uses=1]
|
||||
store i32 %1, i32* %retval, align 4, !dbg !23
|
||||
br label %return, !dbg !23
|
||||
|
||||
return: ; preds = %entry
|
||||
%retval1 = load i32* %retval, !dbg !23 ; <i32> [#uses=1]
|
||||
ret i32 %retval1, !dbg !23
|
||||
}
|
||||
|
||||
define linkonce_odr void @_ZN5test1C1Ev(%struct.test1* %this) nounwind ssp align 2 {
|
||||
entry:
|
||||
%this_addr = alloca %struct.test1* ; <%struct.test1**> [#uses=2]
|
||||
%"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
|
||||
call void @llvm.dbg.declare(metadata !{%struct.test1** %this_addr}, metadata !24), !dbg !28
|
||||
store %struct.test1* %this, %struct.test1** %this_addr
|
||||
%0 = load %struct.test1** %this_addr, align 8, !dbg !28 ; <%struct.test1*> [#uses=1]
|
||||
%1 = getelementptr inbounds %struct.test1* %0, i32 0, i32 0, !dbg !28 ; <i32 (...)***> [#uses=1]
|
||||
store i32 (...)** getelementptr inbounds ([4 x i32 (...)*]* @_ZTV5test1, i64 0, i64 2), i32 (...)*** %1, align 8, !dbg !28
|
||||
br label %return, !dbg !28
|
||||
|
||||
return: ; preds = %entry
|
||||
ret void, !dbg !29
|
||||
}
|
||||
|
||||
declare void @llvm.dbg.declare(metadata, metadata) nounwind readnone
|
||||
|
||||
define linkonce_odr void @_ZN5test1D1Ev(%struct.test1* %this) nounwind ssp align 2 {
|
||||
entry:
|
||||
%this_addr = alloca %struct.test1* ; <%struct.test1**> [#uses=3]
|
||||
%"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
|
||||
call void @llvm.dbg.declare(metadata !{%struct.test1** %this_addr}, metadata !32), !dbg !34
|
||||
store %struct.test1* %this, %struct.test1** %this_addr
|
||||
%0 = load %struct.test1** %this_addr, align 8, !dbg !35 ; <%struct.test1*> [#uses=1]
|
||||
%1 = getelementptr inbounds %struct.test1* %0, i32 0, i32 0, !dbg !35 ; <i32 (...)***> [#uses=1]
|
||||
store i32 (...)** getelementptr inbounds ([4 x i32 (...)*]* @_ZTV5test1, i64 0, i64 2), i32 (...)*** %1, align 8, !dbg !35
|
||||
br label %bb, !dbg !37
|
||||
|
||||
bb: ; preds = %entry
|
||||
%2 = trunc i32 0 to i8, !dbg !37 ; <i8> [#uses=1]
|
||||
%toBool = icmp ne i8 %2, 0, !dbg !37 ; <i1> [#uses=1]
|
||||
br i1 %toBool, label %bb1, label %bb2, !dbg !37
|
||||
|
||||
bb1: ; preds = %bb
|
||||
%3 = load %struct.test1** %this_addr, align 8, !dbg !37 ; <%struct.test1*> [#uses=1]
|
||||
%4 = bitcast %struct.test1* %3 to i8*, !dbg !37 ; <i8*> [#uses=1]
|
||||
call void @_ZdlPv(i8* %4) nounwind, !dbg !37
|
||||
br label %bb2, !dbg !37
|
||||
|
||||
bb2: ; preds = %bb1, %bb
|
||||
br label %return, !dbg !37
|
||||
|
||||
return: ; preds = %bb2
|
||||
ret void, !dbg !37
|
||||
}
|
||||
|
||||
define linkonce_odr void @_ZN5test1D0Ev(%struct.test1* %this) nounwind ssp align 2 {
|
||||
entry:
|
||||
%this_addr = alloca %struct.test1* ; <%struct.test1**> [#uses=3]
|
||||
%"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
|
||||
call void @llvm.dbg.declare(metadata !{%struct.test1** %this_addr}, metadata !38), !dbg !40
|
||||
store %struct.test1* %this, %struct.test1** %this_addr
|
||||
%0 = load %struct.test1** %this_addr, align 8, !dbg !41 ; <%struct.test1*> [#uses=1]
|
||||
%1 = getelementptr inbounds %struct.test1* %0, i32 0, i32 0, !dbg !41 ; <i32 (...)***> [#uses=1]
|
||||
store i32 (...)** getelementptr inbounds ([4 x i32 (...)*]* @_ZTV5test1, i64 0, i64 2), i32 (...)*** %1, align 8, !dbg !41
|
||||
br label %bb, !dbg !43
|
||||
|
||||
bb: ; preds = %entry
|
||||
%2 = trunc i32 1 to i8, !dbg !43 ; <i8> [#uses=1]
|
||||
%toBool = icmp ne i8 %2, 0, !dbg !43 ; <i1> [#uses=1]
|
||||
br i1 %toBool, label %bb1, label %bb2, !dbg !43
|
||||
|
||||
bb1: ; preds = %bb
|
||||
%3 = load %struct.test1** %this_addr, align 8, !dbg !43 ; <%struct.test1*> [#uses=1]
|
||||
%4 = bitcast %struct.test1* %3 to i8*, !dbg !43 ; <i8*> [#uses=1]
|
||||
call void @_ZdlPv(i8* %4) nounwind, !dbg !43
|
||||
br label %bb2, !dbg !43
|
||||
|
||||
bb2: ; preds = %bb1, %bb
|
||||
br label %return, !dbg !43
|
||||
|
||||
return: ; preds = %bb2
|
||||
ret void, !dbg !43
|
||||
}
|
||||
|
||||
declare void @_ZdlPv(i8*) nounwind
|
||||
|
||||
!0 = metadata !{i32 459008, metadata !1, metadata !"tst", metadata !4, i32 13, metadata !8} ; [ DW_TAG_auto_variable ]
|
||||
!1 = metadata !{i32 458763, metadata !2, i32 0, i32 0} ; [ DW_TAG_lexical_block ]
|
||||
!2 = metadata !{i32 458763, metadata !3, i32 0, i32 0} ; [ DW_TAG_lexical_block ]
|
||||
!3 = metadata !{i32 458798, i32 0, metadata !4, metadata !"main", metadata !"main", metadata !"main", metadata !4, i32 11, metadata !5, i1 false, i1 true, i32 0, i32 0, null, i1 false} ; [ DW_TAG_subprogram ]
|
||||
!4 = metadata !{i32 458769, i32 0, i32 4, metadata !"inheritance.cpp", metadata !"/tmp/", metadata !"4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", i1 true, i1 false, metadata !"", i32 0} ; [ DW_TAG_compile_unit ]
|
||||
!5 = metadata !{i32 458773, metadata !4, metadata !"", metadata !4, i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !6, i32 0, null} ; [ DW_TAG_subroutine_type ]
|
||||
!6 = metadata !{metadata !7}
|
||||
!7 = metadata !{i32 458788, metadata !4, metadata !"int", metadata !4, i32 0, i64 32, i64 32, i64 0, i32 0, i32 5} ; [ DW_TAG_base_type ]
|
||||
!8 = metadata !{i32 458771, metadata !4, metadata !"test1", metadata !4, i32 1, i64 64, i64 64, i64 0, i32 0, null, metadata !9, i32 0, metadata !8} ; [ DW_TAG_structure_type ]
|
||||
!9 = metadata !{metadata !10, metadata !14, metadata !18}
|
||||
!10 = metadata !{i32 458765, metadata !8, metadata !"_vptr$test1", metadata !4, i32 1, i64 64, i64 64, i64 0, i32 0, metadata !11} ; [ DW_TAG_member ]
|
||||
!11 = metadata !{i32 458767, metadata !4, metadata !"", metadata !4, i32 0, i64 64, i64 64, i64 0, i32 0, metadata !12} ; [ DW_TAG_pointer_type ]
|
||||
!12 = metadata !{i32 458767, metadata !4, metadata !"__vtbl_ptr_type", metadata !13, i32 0, i64 0, i64 0, i64 0, i32 0, metadata !5} ; [ DW_TAG_pointer_type ]
|
||||
!13 = metadata !{i32 458769, i32 0, i32 4, metadata !"<built-in>", metadata !"/tmp/", metadata !"4.2.1 (Based on Apple Inc. build 5658) (LLVM build)", i1 false, i1 false, metadata !"", i32 0} ; [ DW_TAG_compile_unit ]
|
||||
!14 = metadata !{i32 458798, i32 0, metadata !8, metadata !"test1", metadata !"test1", metadata !"", metadata !4, i32 1, metadata !15, i1 false, i1 false, i32 0, i32 0, null, i1 true} ; [ DW_TAG_subprogram ]
|
||||
!15 = metadata !{i32 458773, metadata !4, metadata !"", metadata !4, i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !16, i32 0, null} ; [ DW_TAG_subroutine_type ]
|
||||
!16 = metadata !{null, metadata !17}
|
||||
!17 = metadata !{i32 458767, metadata !4, metadata !"", metadata !4, i32 0, i64 64, i64 64, i64 0, i32 64, metadata !8} ; [ DW_TAG_pointer_type ]
|
||||
!18 = metadata !{i32 458798, i32 0, metadata !8, metadata !"~test1", metadata !"~test1", metadata !"", metadata !4, i32 4, metadata !19, i1 false, i1 false, i32 1, i32 0, metadata !8, i1 false} ; [ DW_TAG_subprogram ]
|
||||
!19 = metadata !{i32 458773, metadata !4, metadata !"", metadata !4, i32 0, i64 0, i64 0, i64 0, i32 0, null, metadata !20, i32 0, null} ; [ DW_TAG_subroutine_type ]
|
||||
!20 = metadata !{null, metadata !17, metadata !7}
|
||||
!21 = metadata !{i32 11, i32 0, metadata !1, null}
|
||||
!22 = metadata !{i32 13, i32 0, metadata !1, null}
|
||||
!23 = metadata !{i32 14, i32 0, metadata !1, null}
|
||||
!24 = metadata !{i32 459009, metadata !25, metadata !"this", metadata !4, i32 13, metadata !26} ; [ DW_TAG_arg_variable ]
|
||||
!25 = metadata !{i32 458798, i32 0, metadata !4, metadata !"test1", metadata !"test1", metadata !"_ZN5test1C1Ev", metadata !4, i32 1, metadata !15, i1 false, i1 true, i32 0, i32 0, null, i1 false} ; [ DW_TAG_subprogram ]
|
||||
!26 = metadata !{i32 458790, metadata !4, metadata !"", metadata !4, i32 0, i64 64, i64 64, i64 0, i32 64, metadata !27} ; [ DW_TAG_const_type ]
|
||||
!27 = metadata !{i32 458767, metadata !4, metadata !"", metadata !4, i32 0, i64 64, i64 64, i64 0, i32 0, metadata !8} ; [ DW_TAG_pointer_type ]
|
||||
!28 = metadata !{i32 1, i32 0, metadata !25, null}
|
||||
!29 = metadata !{i32 1, i32 0, metadata !30, null}
|
||||
!30 = metadata !{i32 458763, metadata !31, i32 0, i32 0} ; [ DW_TAG_lexical_block ]
|
||||
!31 = metadata !{i32 458763, metadata !25, i32 0, i32 0} ; [ DW_TAG_lexical_block ]
|
||||
!32 = metadata !{i32 459009, metadata !33, metadata !"this", metadata !4, i32 4, metadata !26} ; [ DW_TAG_arg_variable ]
|
||||
!33 = metadata !{i32 458798, i32 0, metadata !8, metadata !"~test1", metadata !"~test1", metadata !"_ZN5test1D1Ev", metadata !4, i32 4, metadata !15, i1 false, i1 true, i32 1, i32 0, metadata !8, i1 false} ; [ DW_TAG_subprogram ]
|
||||
!34 = metadata !{i32 4, i32 0, metadata !33, null}
|
||||
!35 = metadata !{i32 5, i32 0, metadata !36, null}
|
||||
!36 = metadata !{i32 458763, metadata !33, i32 0, i32 0} ; [ DW_TAG_lexical_block ]
|
||||
!37 = metadata !{i32 6, i32 0, metadata !36, null}
|
||||
!38 = metadata !{i32 459009, metadata !39, metadata !"this", metadata !4, i32 4, metadata !26} ; [ DW_TAG_arg_variable ]
|
||||
!39 = metadata !{i32 458798, i32 0, metadata !8, metadata !"~test1", metadata !"~test1", metadata !"_ZN5test1D0Ev", metadata !4, i32 4, metadata !15, i1 false, i1 true, i32 1, i32 1, metadata !8, i1 false} ; [ DW_TAG_subprogram ]
|
||||
!40 = metadata !{i32 4, i32 0, metadata !39, null}
|
||||
!41 = metadata !{i32 5, i32 0, metadata !42, null}
|
||||
!42 = metadata !{i32 458763, metadata !39, i32 0, i32 0} ; [ DW_TAG_lexical_block ]
|
||||
!43 = metadata !{i32 6, i32 0, metadata !42, null}
|
Loading…
x
Reference in New Issue
Block a user