]> granicus.if.org Git - clang/commitdiff
Set the Int64Type / IntMaxType types correctly for OpenBSD/mips64
authorBrad Smith <brad@comstyle.com>
Mon, 6 Mar 2017 23:48:31 +0000 (23:48 +0000)
committerBrad Smith <brad@comstyle.com>
Mon, 6 Mar 2017 23:48:31 +0000 (23:48 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@297098 91177308-0d34-0410-b5e6-96231b3b80d8

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

index 3616baf61e9c00ee4888bde2fb149589aa7c1191..95321ec381320dd03f8c82fa9aa67a53edc3b191 100644 (file)
@@ -7578,7 +7578,11 @@ public:
 
   void setN64ABITypes() {
     setN32N64ABITypes();
-    Int64Type = SignedLong;
+    if (getTriple().getOS() == llvm::Triple::OpenBSD) {
+      Int64Type = SignedLongLong;
+    } else {
+      Int64Type = SignedLong;
+    }
     IntMaxType = Int64Type;
     LongWidth = LongAlign = 64;
     PointerWidth = PointerAlign = 64;
index 2ca05ae7c542f6313e1e3b78ab49ee6ba538b1eb..cae6aa042bef797890a6b7c8ec89d7b030ea5e54 100644 (file)
 // RUN: %clang_cc1 -E -dM -ffreestanding -triple=arm-unknown-openbsd6.1-gnueabi < /dev/null | FileCheck -match-full-lines -check-prefix OPENBSD %s
 // RUN: %clang_cc1 -E -dM -ffreestanding -triple=i386-unknown-openbsd6.1 < /dev/null | FileCheck -match-full-lines -check-prefix OPENBSD %s
 // RUN: %clang_cc1 -E -dM -ffreestanding -triple=powerpc-unknown-openbsd6.1 < /dev/null | FileCheck -match-full-lines -check-prefix OPENBSD %s
+// RUN: %clang_cc1 -E -dM -ffreestanding -triple=mips64-unknown-openbsd6.1 < /dev/null | FileCheck -match-full-lines -check-prefix OPENBSD %s
+// RUN: %clang_cc1 -E -dM -ffreestanding -triple=mips64el-unknown-openbsd6.1 < /dev/null | FileCheck -match-full-lines -check-prefix OPENBSD %s
 // RUN: %clang_cc1 -E -dM -ffreestanding -triple=sparc64-unknown-openbsd6.1 < /dev/null | FileCheck -match-full-lines -check-prefix OPENBSD %s
 // OPENBSD:#define __ELF__ 1
 // OPENBSD:#define __INT16_TYPE__ short