2002-08-20 19:34:51 +00:00
|
|
|
; This file is used by testlink1.ll, so it doesn't actually do anything itself
|
|
|
|
;
|
2007-01-27 21:08:29 +00:00
|
|
|
; RUN: true
|
2001-10-13 07:15:38 +00:00
|
|
|
|
|
|
|
%MyVar = global int 4
|
2003-04-21 21:06:25 +00:00
|
|
|
%MyIntList = external global { \2 *, int }
|
2001-10-13 07:15:38 +00:00
|
|
|
|
|
|
|
%AConst = constant int 123
|
|
|
|
|
2001-11-26 19:17:06 +00: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 03:11:58 +00:00
|
|
|
%MyIntListPtr = constant { {\2,int}* } { {\2,int}* %MyIntList }
|
2003-04-23 18:38:13 +00:00
|
|
|
%MyVarPtr = linkonce global { int * } { int * %MyVar }
|
2001-10-15 03:11:58 +00:00
|
|
|
|
2001-10-14 23:28:56 +00:00
|
|
|
constant int 412
|
|
|
|
|
2001-10-13 07:15:38 +00:00
|
|
|
implementation
|
|
|
|
|
|
|
|
int "foo"(int %blah)
|
|
|
|
begin
|
|
|
|
store int %blah, int *%MyVar
|
2006-11-23 15:14:52 +00:00
|
|
|
%idx = getelementptr { \2 *, int } * %MyIntList, long 0, uint 1
|
2002-08-22 16:39:05 +00:00
|
|
|
store int 12, int* %idx
|
2001-10-14 23:28:56 +00:00
|
|
|
|
2001-10-15 03:11:58 +00:00
|
|
|
%ack = load int * %0 ;; Load from the unnamed constant
|
|
|
|
%fzo = add int %ack, %blah
|
|
|
|
ret int %fzo
|
2001-10-13 07:15:38 +00:00
|
|
|
end
|
|
|
|
|
2001-10-14 23:28:56 +00:00
|
|
|
declare void "unimp"(float, double)
|
2001-11-26 19:17:06 +00:00
|
|
|
|
|
|
|
internal void "testintern"() begin ret void end
|
|
|
|
void "Testintern"() begin ret void end
|
|
|
|
internal void "testIntern"() begin ret void end
|
|
|
|
|