llvm-project/llvm/test/Linker/testlink2.ll

37 lines
931 B
LLVM
Raw Normal View History

2002-08-21 03:34:51 +08:00
; This file is used by testlink1.ll, so it doesn't actually do anything itself
;
; RUN: echo
2001-10-13 15:15:38 +08:00
%MyVar = global int 4
2003-04-22 05:06:25 +08:00
%MyIntList = external global { \2 *, int }
2001-10-13 15:15:38 +08:00
%AConst = constant int 123
%Intern1 = internal constant int 52 ;; Intern in both testlink[12].ll
%Intern2 = constant int 12345 ;; Intern in one but not in other
%MyIntListPtr = constant { {\2,int}* } { {\2,int}* %MyIntList }
%MyVarPtr = linkonce global { int * } { int * %MyVar }
constant int 412
2001-10-13 15:15:38 +08:00
implementation
int "foo"(int %blah)
begin
store int %blah, int *%MyVar
%idx = getelementptr { \2 *, int } * %MyIntList, long 0, uint 1
store int 12, int* %idx
%ack = load int * %0 ;; Load from the unnamed constant
%fzo = add int %ack, %blah
ret int %fzo
2001-10-13 15:15:38 +08:00
end
declare void "unimp"(float, double)
internal void "testintern"() begin ret void end
void "Testintern"() begin ret void end
internal void "testIntern"() begin ret void end