mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-29 06:30:39 +00:00
* Build with warnings
* Add a bunch of testcases. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@3393 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
83c577566e
commit
d366e4094a
5
test/CBackend/2002-08-19-ConstPointerRef.ll
Normal file
5
test/CBackend/2002-08-19-ConstPointerRef.ll
Normal file
@ -0,0 +1,5 @@
|
||||
; Test const pointer refs & forward references
|
||||
|
||||
%t3 = global int * %t1 ;; Forward reference
|
||||
%t1 = global int 4
|
||||
|
7
test/CBackend/2002-08-19-ConstantExpr.ll
Normal file
7
test/CBackend/2002-08-19-ConstantExpr.ll
Normal file
@ -0,0 +1,7 @@
|
||||
global int* cast (float* %0 to int*) ;; Forward numeric reference
|
||||
global float* %0 ;; Duplicate forward numeric reference
|
||||
global float 0.0
|
||||
|
||||
%array = constant [2 x int] [ int 12, int 52 ]
|
||||
%arrayPtr = global int* getelementptr ([2 x int]* %array, uint 0, uint 0) ;; int* &%array[0][0]
|
||||
|
3
test/CBackend/2002-08-19-DataPointer.ll
Normal file
3
test/CBackend/2002-08-19-DataPointer.ll
Normal file
@ -0,0 +1,3 @@
|
||||
%sptr1 = global [11x sbyte]* %somestr ;; Forward ref to a constant
|
||||
%somestr = constant [11x sbyte] c"hello world"
|
||||
|
3
test/CBackend/2002-08-19-FunctionPointer.ll
Normal file
3
test/CBackend/2002-08-19-FunctionPointer.ll
Normal file
@ -0,0 +1,3 @@
|
||||
%fptr = global void() * %f ;; Forward ref method defn
|
||||
declare void "f"() ;; External method
|
||||
|
@ -15,7 +15,7 @@ all:: $(addprefix Output/, $(TESTS:%.ll=%.to))
|
||||
|
||||
|
||||
Output/%.to: Output/%.c
|
||||
gcc -c $< -o $@ || \
|
||||
gcc -c -W -Wall $< -o $@ || \
|
||||
(rm -f $@; $(FAILURE) $@ )
|
||||
|
||||
Output/%.c: %.ll Output/.dir $(LAS) $(LDIS)
|
||||
|
5
test/CodeGen/CBackend/2002-08-19-ConstPointerRef.ll
Normal file
5
test/CodeGen/CBackend/2002-08-19-ConstPointerRef.ll
Normal file
@ -0,0 +1,5 @@
|
||||
; Test const pointer refs & forward references
|
||||
|
||||
%t3 = global int * %t1 ;; Forward reference
|
||||
%t1 = global int 4
|
||||
|
7
test/CodeGen/CBackend/2002-08-19-ConstantExpr.ll
Normal file
7
test/CodeGen/CBackend/2002-08-19-ConstantExpr.ll
Normal file
@ -0,0 +1,7 @@
|
||||
global int* cast (float* %0 to int*) ;; Forward numeric reference
|
||||
global float* %0 ;; Duplicate forward numeric reference
|
||||
global float 0.0
|
||||
|
||||
%array = constant [2 x int] [ int 12, int 52 ]
|
||||
%arrayPtr = global int* getelementptr ([2 x int]* %array, uint 0, uint 0) ;; int* &%array[0][0]
|
||||
|
3
test/CodeGen/CBackend/2002-08-19-DataPointer.ll
Normal file
3
test/CodeGen/CBackend/2002-08-19-DataPointer.ll
Normal file
@ -0,0 +1,3 @@
|
||||
%sptr1 = global [11x sbyte]* %somestr ;; Forward ref to a constant
|
||||
%somestr = constant [11x sbyte] c"hello world"
|
||||
|
3
test/CodeGen/CBackend/2002-08-19-FunctionPointer.ll
Normal file
3
test/CodeGen/CBackend/2002-08-19-FunctionPointer.ll
Normal file
@ -0,0 +1,3 @@
|
||||
%fptr = global void() * %f ;; Forward ref method defn
|
||||
declare void "f"() ;; External method
|
||||
|
Loading…
Reference in New Issue
Block a user