mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-21 00:32:23 +00:00
14 lines
286 B
LLVM
14 lines
286 B
LLVM
|
; RUN: llvm-as < %s | opt -mergefunc | llvm-dis > %t
|
||
|
; RUN: grep {define weak} %t | count 2
|
||
|
; RUN: grep {call} %t | count 2
|
||
|
|
||
|
define weak i32 @sum(i32 %x, i32 %y) {
|
||
|
%sum = add i32 %x, %y
|
||
|
ret i32 %sum
|
||
|
}
|
||
|
|
||
|
define weak i32 @add(i32 %x, i32 %y) {
|
||
|
%sum = add i32 %x, %y
|
||
|
ret i32 %sum
|
||
|
}
|