Files
swift-mirror/test/DebugInfo/arg-debug_value.swift
Erik Eckstein 1d3724666f tests: convert about 400 tests to the new mangling by using the -new-mangling-for-tests option
When the new mangling is enabled permanently, the option can be removed from the RUN command lines again.
2017-01-24 15:27:45 -08:00

15 lines
439 B
Swift

// RUN: %target-swift-frontend -Xllvm -new-mangling-for-tests -primary-file %s -emit-ir -g -o - | %FileCheck %s
// Verify that arguments described by debug_value intrinsics are only
// emitted once.
var g: Int64 = 1
class Foo {
var x: Int64
// CHECK: define {{.*}}_T04main3FooCACycfc
// CHECK: entry:
// CHECK-NEXT: call void @llvm.dbg.value(metadata %C4main3Foo* %0
// CHECK: ret %C4main3Foo* %0
init () { x = g; g += 1 }
}