blob: 125bd5ff251ffd9fa2e2580603b8f10a05b1278f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
// RUN: llgo -S -emit-llvm -o - %s | FileCheck %s
package foo
import _ "fmt"
var X interface{}
// CHECK: @"init$guard" = internal global i1 false
// CHECK: define void @foo..import()
// CHECK-NEXT: :
// CHECK-NEXT: %[[N:.*]] = load i1* @"init$guard"
// 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"
// CHECK-NEXT: call void @fmt..import()
// CHECK-NEXT: br label
|