[llvm-branch-commits] [cfe-branch] r301605 - Merging r297098:

Brad Smith via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Apr 27 17:36:13 PDT 2017


Author: brad
Date: Thu Apr 27 19:36:13 2017
New Revision: 301605

URL: http://llvm.org/viewvc/llvm-project?rev=301605&view=rev
Log:
Merging r297098:

------------------------------------------------------------------------
r297098 | brad | 2017-03-06 18:48:31 -0500 (Mon, 06 Mar 2017) | 2 lines

Set the Int64Type / IntMaxType types correctly for OpenBSD/mips64
------------------------------------------------------------------------

Modified:
    cfe/branches/release_40/lib/Basic/Targets.cpp
    cfe/branches/release_40/test/Preprocessor/init.c

Modified: cfe/branches/release_40/lib/Basic/Targets.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_40/lib/Basic/Targets.cpp?rev=301605&r1=301604&r2=301605&view=diff
==============================================================================
--- cfe/branches/release_40/lib/Basic/Targets.cpp (original)
+++ cfe/branches/release_40/lib/Basic/Targets.cpp Thu Apr 27 19:36:13 2017
@@ -7540,7 +7540,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;

Modified: cfe/branches/release_40/test/Preprocessor/init.c
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_40/test/Preprocessor/init.c?rev=301605&r1=301604&r2=301605&view=diff
==============================================================================
--- cfe/branches/release_40/test/Preprocessor/init.c (original)
+++ cfe/branches/release_40/test/Preprocessor/init.c Thu Apr 27 19:36:13 2017
@@ -8718,6 +8718,8 @@
 // RUN: %clang_cc1 -E -dM -ffreestanding -triple=aarch64-unknown-openbsd6.1 < /dev/null | FileCheck -match-full-lines -check-prefix OPENBSD %s
 // 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=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




More information about the llvm-branch-commits mailing list