Files
swift-mirror/test/DebugInfo/dbgvalue-insertpt.swift
Adrian Prantl fa28b5e16b Debug Info: Insert dbg.value intrinsics immediately after the instruction
they describe.

This improves the live ranges of local variables during debugging.

<rdar://problem/26627376>
2016-09-23 10:14:56 -07:00

10 lines
462 B
Swift

// RUN: %target-swift-frontend -g -emit-ir %s | %FileCheck %s
for i in 0 ..< 3 {
// CHECK: %[[ALLOCA:[0-9]+]] = alloca %GSqSi_
// CHECK: %[[CAST:[0-9]+]] = bitcast %GSqSi_* %[[ALLOCA]] to i{{32|64}}*
// CHECK: %[[LD:[0-9]+]] = load i{{32|64}}, i{{32|64}}* %[[CAST]]
// CHECK-NEXT: call void @llvm.dbg.value(metadata i{{32|64}} %[[LD]],
// CHECK-SAME: metadata ![[I:[0-9]+]],
// CHECK: ![[I]] = !DILocalVariable(name: "i",
}