17e7b13d0STeresa Johnson; Test of function importing debug messages 27e7b13d0STeresa Johnson 37e7b13d0STeresa Johnson; Require asserts for -debug-only 47e7b13d0STeresa Johnson; REQUIRES: asserts 57e7b13d0STeresa Johnson 67e7b13d0STeresa Johnson; Do setup work for all below tests: generate bitcode and combined index 77e7b13d0STeresa Johnson; RUN: opt -module-summary %s -o %t1.bc 87e7b13d0STeresa Johnson; RUN: opt -module-summary %p/Inputs/funcimport-debug.ll -o %t2.bc 97e7b13d0STeresa Johnson 107e7b13d0STeresa Johnson; RUN: llvm-lto2 run %t1.bc %t2.bc -o %t.o -save-temps \ 117e7b13d0STeresa Johnson; RUN: -r=%t1.bc,_main,plx \ 127e7b13d0STeresa Johnson; RUN: -r=%t1.bc,_foo,l \ 137e7b13d0STeresa Johnson; RUN: -r=%t1.bc,_baz,l \ 147e7b13d0STeresa Johnson; RUN: -r=%t2.bc,_foo,plx \ 157e7b13d0STeresa Johnson; RUN: -r=%t2.bc,_baz,plx \ 167e7b13d0STeresa Johnson; RUN: -thinlto-threads=1 \ 177e7b13d0STeresa Johnson; RUN: -debug-only=function-import 2>&1 | FileCheck %s 187e7b13d0STeresa Johnson 197e7b13d0STeresa Johnson; CHECK-DAG: Initialize import for 6699318081062747564 (foo) 207e7b13d0STeresa Johnson; CHECK-DAG: Initialize import for 15822663052811949562 (main) 217e7b13d0STeresa Johnson; CHECK-DAG: ref -> 7546896869197086323 (baz) 227e7b13d0STeresa Johnson; CHECK-DAG: edge -> 6699318081062747564 (foo) Threshold:100 237e7b13d0STeresa Johnson 247b1d7937SAmy Huangtarget datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" 257e7b13d0STeresa Johnsontarget triple = "x86_64-apple-macosx10.11.0" 267e7b13d0STeresa Johnson 277e7b13d0STeresa Johnsondefine i32 @main() #0 { 287e7b13d0STeresa Johnsonentry: 297e7b13d0STeresa Johnson call void (...) @foo() 30*41d5033eSNikita Popov %0 = load i32, ptr @baz, align 4 317e7b13d0STeresa Johnson ret i32 %0 327e7b13d0STeresa Johnson} 337e7b13d0STeresa Johnson 347e7b13d0STeresa Johnsondeclare void @foo(...) #1 357e7b13d0STeresa Johnson@baz = external global i32 36