diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2013-05-15 03:22:33 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2013-05-15 03:22:33 +0000 |
commit | 248520bdea6b9a753a9da77efebaa72d38c7462d (patch) | |
tree | eb8ea9c05d453621c258cb7ee80fc228c9af3fda | |
parent | c8fcaab6ce13232258f10c4a1a76dfed0b03fde7 (diff) | |
download | bcm5719-llvm-248520bdea6b9a753a9da77efebaa72d38c7462d.tar.gz bcm5719-llvm-248520bdea6b9a753a9da77efebaa72d38c7462d.zip |
Use correct types for SPARC v9.
It's an LP64 platform.
llvm-svn: 181867
-rw-r--r-- | clang/lib/Basic/Targets.cpp | 5 | ||||
-rw-r--r-- | clang/test/Preprocessor/init.c | 8 |
2 files changed, 13 insertions, 0 deletions
diff --git a/clang/lib/Basic/Targets.cpp b/clang/lib/Basic/Targets.cpp index a622a11aa5a..6b376b30adf 100644 --- a/clang/lib/Basic/Targets.cpp +++ b/clang/lib/Basic/Targets.cpp @@ -4304,6 +4304,11 @@ public: // FIXME: Support Sparc quad-precision long double? DescriptionString = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-" "i64:64:64-f32:32:32-f64:64:64-v64:64:64-n32:64-S128"; + // This is an LP64 platform. + LongWidth = LongAlign = PointerWidth = PointerAlign = 64; + IntMaxType = SignedLong; + UIntMaxType = UnsignedLong; + Int64Type = SignedLong; } virtual void getTargetDefines(const LangOptions &Opts, diff --git a/clang/test/Preprocessor/init.c b/clang/test/Preprocessor/init.c index 9671f7e2329..b3af46e5758 100644 --- a/clang/test/Preprocessor/init.c +++ b/clang/test/Preprocessor/init.c @@ -2688,6 +2688,14 @@ // X86_64-LINUX:#define __x86_64 1 // X86_64-LINUX:#define __x86_64__ 1 // +// RUN: %clang_cc1 -E -dM -ffreestanding -triple=sparc64-none-none < /dev/null | FileCheck -check-prefix SPARCV9 %s +// SPARCV9:#define __INTMAX_TYPE__ long int +// SPARCV9:#define __INTPTR_TYPE__ long int +// SPARCV9:#define __LONG_MAX__ 9223372036854775807L +// SPARCV9:#define __LP64__ 1 +// SPARCV9:#define __SIZEOF_LONG__ 8 +// SPARCV9:#define __SIZEOF_POINTER__ 8 +// // RUN: %clang_cc1 -x c++ -triple i686-pc-linux-gnu -fobjc-runtime=gcc -E -dM < /dev/null | FileCheck -check-prefix GNUSOURCE %s // GNUSOURCE:#define _GNU_SOURCE 1 // |