diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2007-01-26 08:44:14 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2007-01-26 08:44:14 +0000 |
commit | 23f1272d372d4d46c68246b5767ad8350d512da4 (patch) | |
tree | 9c41980dbc979171a7b514535e39623f74314b51 | |
parent | ce380568b5406356a04d745c9c6f137000217ef4 (diff) | |
download | bcm5719-llvm-23f1272d372d4d46c68246b5767ad8350d512da4.tar.gz bcm5719-llvm-23f1272d372d4d46c68246b5767ad8350d512da4.zip |
For PR1122:
Test the upgradability of nested type definitions.
llvm-svn: 33534
-rw-r--r-- | llvm/test/Assembler/2007-01-26-PR1122.ll | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/llvm/test/Assembler/2007-01-26-PR1122.ll b/llvm/test/Assembler/2007-01-26-PR1122.ll new file mode 100644 index 00000000000..b2003e281f8 --- /dev/null +++ b/llvm/test/Assembler/2007-01-26-PR1122.ll @@ -0,0 +1,14 @@ +; PR1122 +; Make sure llvm-upgrade can upgrade this. +; RUN: llvm-upgrade < %s > /dev/null +%arraytype_Char_1 = type { int, [0 x sbyte] } +%structtype_rpy_string = type { int, %arraytype_Char_1 } + +%RPyString = type %structtype_rpy_string ;**doesn't work +;%RPyString = type { int, %arraytype_Char_1 } ;**works + +sbyte* %RPyString_AsString(%RPyString* %structstring) { + %source1ptr = getelementptr %RPyString* %structstring, int 0, uint 1, uint 1 + %source1 = cast [0 x sbyte]* %source1ptr to sbyte* + ret sbyte* %source1 +} |