2014-12-31 08:25:39 +08:00
|
|
|
// RUN: llgo -S -emit-llvm -o - %s | FileCheck %s
|
|
|
|
|
|
|
|
package foo
|
|
|
|
|
|
|
|
import _ "fmt"
|
|
|
|
|
|
|
|
var X interface{}
|
|
|
|
|
|
|
|
// CHECK: @"init$guard" = internal global i1 false
|
|
|
|
|
2015-04-06 07:31:49 +08:00
|
|
|
// CHECK: define void @foo..import(i8* nest)
|
2014-12-31 08:25:39 +08:00
|
|
|
// CHECK-NEXT: :
|
2015-03-06 06:55:42 +08:00
|
|
|
// CHECK-NEXT: %[[N:.*]] = load i1, i1* @"init$guard"
|
2014-12-31 08:25:39 +08:00
|
|
|
// CHECK-NEXT: br i1 %[[N]], label %{{.*}}, label %[[L:.*]]
|
|
|
|
|
|
|
|
// CHECK: ; <label>:[[L]]
|
|
|
|
// CHECK-NEXT: call void @__go_register_gc_roots
|
|
|
|
// CHECK-NEXT: store i1 true, i1* @"init$guard"
|
2015-04-06 07:31:49 +08:00
|
|
|
// CHECK-NEXT: call void @fmt..import(i8* undef)
|
2014-12-31 08:25:39 +08:00
|
|
|
// CHECK-NEXT: br label
|