diff options
author | Chris Lattner <sabre@nondot.org> | 2010-02-12 20:49:41 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-02-12 20:49:41 +0000 |
commit | 392be58cad0f051b4e7e252b44cef14b547f9b81 (patch) | |
tree | 94d1ae41a937c2ba15293075eca262842da5d3fe /llvm/test/Feature | |
parent | bdf1b9520cf4be11020a6d2af5b84b33c12e1514 (diff) | |
download | bcm5719-llvm-392be58cad0f051b4e7e252b44cef14b547f9b81.tar.gz bcm5719-llvm-392be58cad0f051b4e7e252b44cef14b547f9b81.zip |
Add support for a union type in LLVM IR. Patch by Talin!
llvm-svn: 96011
Diffstat (limited to 'llvm/test/Feature')
-rw-r--r-- | llvm/test/Feature/unions.ll | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/test/Feature/unions.ll b/llvm/test/Feature/unions.ll new file mode 100644 index 00000000000..9d6c36bb3c5 --- /dev/null +++ b/llvm/test/Feature/unions.ll @@ -0,0 +1,12 @@ +; RUN: llvm-as < %s | llvm-dis > %t1.ll +; RUN: llvm-as %t1.ll -o - | llvm-dis > %t2.ll +; RUN: diff %t1.ll %t2.ll + +%union.anon = type union { i8, i32, float } + +@union1 = constant union { i32, i8 } { i32 4 } +@union2 = constant union { i32, i8 } insertvalue(union { i32, i8 } undef, i32 4, 0) + +define void @"Unions" () { + ret void +} |