diff options
author | Kevin Qin <Kevin.Qin@arm.com> | 2014-02-24 02:45:03 +0000 |
---|---|---|
committer | Kevin Qin <Kevin.Qin@arm.com> | 2014-02-24 02:45:03 +0000 |
commit | ad64f6d4e541972ee688fca23eae71b2304e567c (patch) | |
tree | 142c1e4286194d17bbbdc5922b0e5a623cd3c95a /clang/test/CodeGenCXX/int64_uint64.cpp | |
parent | 51bacfd9c7b671da9c6bb0c3f98cb775994cffdd (diff) | |
download | bcm5719-llvm-ad64f6d4e541972ee688fca23eae71b2304e567c.tar.gz bcm5719-llvm-ad64f6d4e541972ee688fca23eae71b2304e567c.zip |
[AArch64] Change int64_t from 'long long int' to 'long int' for AArch64 target.
Most 64-bit targets define int64_t as long int, and AArch64 should
make same definition to follow LP64 model. In GNU tool chain, int64_t
is defined as long int for 64-bit target. So to get consistent with GNU,
it's better Changing int64_t from 'long long int' to 'long int',
otherwise clang will get different name mangling suffix compared with g++.
llvm-svn: 202004
Diffstat (limited to 'clang/test/CodeGenCXX/int64_uint64.cpp')
-rw-r--r-- | clang/test/CodeGenCXX/int64_uint64.cpp | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/int64_uint64.cpp b/clang/test/CodeGenCXX/int64_uint64.cpp new file mode 100644 index 00000000000..3ec976acecc --- /dev/null +++ b/clang/test/CodeGenCXX/int64_uint64.cpp @@ -0,0 +1,25 @@ +// REQUIRES: arm-registered-target +// RUN: %clang_cc1 -triple arm-linux-guneabi \ +// RUN: -target-cpu cortex-a8 \ +// RUN: -emit-llvm -w -O1 -o - %s | FileCheck --check-prefix=CHECK-ARM %s + +// REQUIRES: aarch64-registered-target +// RUN: %clang_cc1 -triple aarch64-linux-gnueabi \ +// RUN: -target-feature +neon \ +// RUN: -emit-llvm -w -O1 -o - %s | FileCheck --check-prefix=CHECK-AARCH64 %s + +// Test if int64_t and uint64_t can be correctly mangled. + +#include "arm_neon.h" +// CHECK-ARM: f1x( +// CHECK-AARCH64: f1l( +void f1(int64_t a) {} +// CHECK-ARM: f2y( +// CHECK-AARCH64: f2m( +void f2(uint64_t a) {} +// CHECK-ARM: f3Px( +// CHECK-AARCH64: f3Pl( +void f3(int64_t *ptr) {} +// CHECK-ARM: f4Py( +// CHECK-AARCH64: f4Pm( +void f4(uint64_t *ptr) {} |