]> granicus.if.org Git - clang/commitdiff
Use correct types for SPARC v9.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Wed, 15 May 2013 03:22:33 +0000 (03:22 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Wed, 15 May 2013 03:22:33 +0000 (03:22 +0000)
It's an LP64 platform.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@181867 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Basic/Targets.cpp
test/Preprocessor/init.c

index a622a11aa5a26e7c0efd3ed3e457ec70a00f243f..6b376b30adf082e3b209c6fa41cd889d9308cda2 100644 (file)
@@ -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,
index 9671f7e23293b3b3f6749ac7d07a5e82f049ef23..b3af46e5758fdd484f3c85a49eb8d9cc9aa63e2b 100644 (file)
 // 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
 //