mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 20:29:48 +00:00
08189d625d
it for now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106960 91177308-0d34-0410-b5e6-96231b3b80d8
34 lines
985 B
LLVM
34 lines
985 B
LLVM
; If there are two specializations of a function, make sure each callsite
|
|
; calls the right one.
|
|
;
|
|
; RN: opt -S -partialspecialization %s | FileCheck %s
|
|
; RUN: true
|
|
declare void @callback1()
|
|
declare void @callback2()
|
|
|
|
define internal void @UseCallback(void()* %pCallback) {
|
|
call void %pCallback()
|
|
ret void
|
|
}
|
|
|
|
define void @foo(void()* %pNonConstCallback)
|
|
{
|
|
Entry:
|
|
; CHECK: Entry
|
|
; CHECK-NEXT: call void @callback1()
|
|
; CHECK-NEXT: call void @callback1()
|
|
; CHECK-NEXT: call void @callback2()
|
|
; CHECK-NEXT: call void %pNonConstCallback()
|
|
; CHECK-NEXT: call void @callback1()
|
|
; CHECK-NEXT: call void @callback2()
|
|
; CHECK-NEXT: call void @callback2()
|
|
call void @UseCallback(void()* @callback1)
|
|
call void @UseCallback(void()* @callback1)
|
|
call void @UseCallback(void()* @callback2)
|
|
call void @UseCallback(void()* %pNonConstCallback)
|
|
call void @UseCallback(void()* @callback1)
|
|
call void @UseCallback(void()* @callback2)
|
|
call void @UseCallback(void()* @callback2)
|
|
ret void
|
|
}
|