diff options
author | Daniel Dunbar <daniel@zuster.org> | 2008-09-05 00:57:45 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2008-09-05 00:57:45 +0000 |
commit | 2ffee610dac058f42a25e6a574b31414b47866db (patch) | |
tree | e664f71f93240da13d29ce8b5a37d3383bdcff3e /clang/test/CodeGen/function-attributes.c | |
parent | 50288e3c99f4d1525e42653e0ca2c1792662e31f (diff) | |
download | bcm5719-llvm-2ffee610dac058f42a25e6a574b31414b47866db.tar.gz bcm5719-llvm-2ffee610dac058f42a25e6a574b31414b47866db.zip |
Set sext/zext on function result.
- <rdar://problem/6156739>
llvm-svn: 55815
Diffstat (limited to 'clang/test/CodeGen/function-attributes.c')
-rw-r--r-- | clang/test/CodeGen/function-attributes.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/clang/test/CodeGen/function-attributes.c b/clang/test/CodeGen/function-attributes.c new file mode 100644 index 00000000000..bb482a043d9 --- /dev/null +++ b/clang/test/CodeGen/function-attributes.c @@ -0,0 +1,22 @@ +// RUN: clang -emit-llvm -o %t.clang.ll %s && +// RUN: %llvmgcc -c --emit-llvm -o - %s | llvm-dis -f -o %t.gcc.ll && +// RUN: grep "define" %t.clang.ll | sort > %t.clang.defs && +// RUN: grep "define" %t.gcc.ll | sort > %t.gcc.defs && +// RUN: diff %t.clang.defs %t.gcc.defs + +signed char f0(int x) { return x; } + +unsigned char f1(int x) { return x; } + +void f2(signed char x) { } + +void f3(unsigned char x) { } + +signed short f4(int x) { return x; } + +unsigned short f5(int x) { return x; } + +void f6(signed short x) { } + +void f7(unsigned short x) { } + |