github.com/llvm-mirror/llgo@v0.0.0-20190322182713-bf6f0a60fce1/test/irgen/imports.go (about) 1 // RUN: llgo -S -emit-llvm -o - %s | FileCheck %s 2 3 package foo 4 5 import _ "fmt" 6 7 var X interface{} 8 9 // CHECK: @"init$guard" = internal global i1 false 10 11 // CHECK: define void @foo..import(i8* nest) 12 // CHECK-NEXT: : 13 // CHECK-NEXT: %[[N:.*]] = load i1, i1* @"init$guard" 14 // CHECK-NEXT: br i1 %[[N]], label %{{.*}}, label %[[L:.*]] 15 16 // CHECK: [[L]]: 17 // CHECK-NEXT: call void @__go_register_gc_roots 18 // CHECK-NEXT: store i1 true, i1* @"init$guard" 19 // CHECK-NEXT: call void @fmt..import(i8* undef) 20 // CHECK-NEXT: br label