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