1*9880d681SAndroid Build Coastguard Worker; RUN: llvm-as < %s > %t.bc 2*9880d681SAndroid Build Coastguard Worker; RUN: llvm-as < %p/2009-09-03-mdnode2.ll > %t2.bc 3*9880d681SAndroid Build Coastguard Worker; RUN: llvm-link %t.bc %t2.bc 4*9880d681SAndroid Build Coastguard Worker 5*9880d681SAndroid Build Coastguard Workerdeclare void @f() nounwind 6*9880d681SAndroid Build Coastguard Worker 7*9880d681SAndroid Build Coastguard Workerdefine i32 @main(...) nounwind { 8*9880d681SAndroid Build Coastguard Workerentry: 9*9880d681SAndroid Build Coastguard Worker %retval = alloca i32 ; <i32*> [#uses=2] 10*9880d681SAndroid Build Coastguard Worker call void @llvm.dbg.func.start(metadata !0) 11*9880d681SAndroid Build Coastguard Worker store i32 0, i32* %retval 12*9880d681SAndroid Build Coastguard Worker call void @llvm.dbg.stoppoint(i32 4, i32 5, metadata !1) 13*9880d681SAndroid Build Coastguard Worker call void @f() 14*9880d681SAndroid Build Coastguard Worker br label %return 15*9880d681SAndroid Build Coastguard Worker 16*9880d681SAndroid Build Coastguard Workerreturn: ; preds = %entry 17*9880d681SAndroid Build Coastguard Worker %0 = load i32, i32* %retval ; <i32> [#uses=1] 18*9880d681SAndroid Build Coastguard Worker call void @llvm.dbg.stoppoint(i32 5, i32 1, metadata !1) 19*9880d681SAndroid Build Coastguard Worker call void @llvm.dbg.region.end(metadata !0) 20*9880d681SAndroid Build Coastguard Worker ret i32 %0 21*9880d681SAndroid Build Coastguard Worker} 22*9880d681SAndroid Build Coastguard Worker 23*9880d681SAndroid Build Coastguard Workerdeclare void @llvm.dbg.func.start(metadata) nounwind readnone 24*9880d681SAndroid Build Coastguard Worker 25*9880d681SAndroid Build Coastguard Workerdeclare void @llvm.dbg.stoppoint(i32, i32, metadata) nounwind readnone 26*9880d681SAndroid Build Coastguard Worker 27*9880d681SAndroid Build Coastguard Workerdeclare void @llvm.dbg.region.end(metadata) nounwind readnone 28*9880d681SAndroid Build Coastguard Worker 29*9880d681SAndroid Build Coastguard Worker!llvm.dbg.cu = !{!1} 30*9880d681SAndroid Build Coastguard Worker 31*9880d681SAndroid Build Coastguard Worker!0 = distinct !DISubprogram(name: "main", linkageName: "main", line: 2, isLocal: false, isDefinition: true, virtualIndex: 6, isOptimized: false, unit: !1, scope: !1) 32*9880d681SAndroid Build Coastguard Worker!1 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "ellcc 0.1.0", isOptimized: true, emissionKind: FullDebug, file: !2) 33*9880d681SAndroid Build Coastguard Worker!2 = !DIFile(filename: "a.c", directory: "/home/rich/ellcc/test/source") 34