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 | c04dc690956fb7589a44b26e68616d87cfd2a3b6 (patch) | |
tree | 501ec1c64204527054d0ee1d1d94c875dc04af19 /test/Assembler | |
parent | e3ff5ada8a8f6cc166ecc45147da0d63c3683026 (diff) | |
download | external_llvm-c04dc690956fb7589a44b26e68616d87cfd2a3b6.zip external_llvm-c04dc690956fb7589a44b26e68616d87cfd2a3b6.tar.gz external_llvm-c04dc690956fb7589a44b26e68616d87cfd2a3b6.tar.bz2 |
For PR1122:
Test the upgradability of nested type definitions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33534 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Assembler')
-rw-r--r-- | test/Assembler/2007-01-26-PR1122.ll | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/Assembler/2007-01-26-PR1122.ll b/test/Assembler/2007-01-26-PR1122.ll new file mode 100644 index 0000000..b2003e2 --- /dev/null +++ b/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 +} |