diff options
| author | Benjamin Kramer <benny.kra@googlemail.com> | 2012-10-06 14:42:22 +0000 |
|---|---|---|
| committer | Benjamin Kramer <benny.kra@googlemail.com> | 2012-10-06 14:42:22 +0000 |
| commit | a801f4a81dc22cccb7b9a6f2cceae124e0f80176 (patch) | |
| tree | ccfbe255a0a2bbed4201cd29863ba75604926b0c /clang/test/Sema/constant-builtins-2.c | |
| parent | 68e2c7bee3ab337cc3134ff99fdd1ce2ddb33c2f (diff) | |
| download | bcm5719-llvm-a801f4a81dc22cccb7b9a6f2cceae124e0f80176.tar.gz bcm5719-llvm-a801f4a81dc22cccb7b9a6f2cceae124e0f80176.zip | |
Expose __builtin_bswap16.
GCC has always supported this on PowerPC and 4.8 supports it on all platforms,
so it's a good idea to expose it in clang too. LLVM supports this on all targets.
llvm-svn: 165362
Diffstat (limited to 'clang/test/Sema/constant-builtins-2.c')
| -rw-r--r-- | clang/test/Sema/constant-builtins-2.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/test/Sema/constant-builtins-2.c b/clang/test/Sema/constant-builtins-2.c index d78a176ef49..13d81fe13cb 100644 --- a/clang/test/Sema/constant-builtins-2.c +++ b/clang/test/Sema/constant-builtins-2.c @@ -48,8 +48,9 @@ extern int f(); int h0 = __builtin_types_compatible_p(int, float); //int h1 = __builtin_choose_expr(1, 10, f()); //int h2 = __builtin_expect(0, 0); -int h3 = __builtin_bswap32(0x1234) == 0x34120000 ? 1 : f(); -int h4 = __builtin_bswap64(0x1234) == 0x3412000000000000 ? 1 : f(); +int h3 = __builtin_bswap16(0x1234) == 0x3412 ? 1 : f(); +int h4 = __builtin_bswap32(0x1234) == 0x34120000 ? 1 : f(); +int h5 = __builtin_bswap64(0x1234) == 0x3412000000000000 ? 1 : f(); extern long int bi0; extern __typeof__(__builtin_expect(0, 0)) bi0; |

