1; Test to check the callgraph for calls to casts. 2; RUN: opt -module-summary %s -o %t.o 3; RUN: llvm-bcanalyzer -dump %t.o | FileCheck %s 4; PR34966 5 6; CHECK: <GLOBALVAL_SUMMARY_BLOCK 7; CHECK-NEXT: <VERSION 8; "op7=1" is a call to "callee" function. 9; CHECK-NEXT: <PERMODULE {{.*}} op7=1 op8=[[ALIASID:[0-9]+]]/> 10; CHECK-NEXT: <PERMODULE {{.*}} op0=[[ALIASEEID:[0-9]+]] 11; CHECK-NEXT: <ALIAS {{.*}} op0=[[ALIASID]] {{.*}} op2=[[ALIASEEID]]/> 12; CHECK-NEXT: </GLOBALVAL_SUMMARY_BLOCK> 13 14; ModuleID = 'thinlto-function-summary-callgraph-cast.ll' 15target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" 16target triple = "x86_64-unknown-linux-gnu" 17 18define void @caller() { 19 call void bitcast (void (...)* @callee to void ()*)() 20 call void bitcast (void (...)* @analias to void ()*)() 21 ret void 22} 23 24declare void @callee(...) 25 26@analias = alias void (...), bitcast (void ()* @aliasee to void (...)*) 27 28define void @aliasee() { 29entry: 30 ret void 31} 32