diff options
author | Brad Smith <brad@comstyle.com> | 2017-03-06 23:48:31 +0000 |
---|---|---|
committer | Brad Smith <brad@comstyle.com> | 2017-03-06 23:48:31 +0000 |
commit | 8e55bd5bbd5e7e46c48a04fe8f4575b3727e148e (patch) | |
tree | 6f8e363d8e3df92e7616dc7fa41883644aa0f43a | |
parent | 8c6b546dfd93409aec97534929ffd2143c279ccc (diff) | |
download | bcm5719-llvm-8e55bd5bbd5e7e46c48a04fe8f4575b3727e148e.tar.gz bcm5719-llvm-8e55bd5bbd5e7e46c48a04fe8f4575b3727e148e.zip |
Set the Int64Type / IntMaxType types correctly for OpenBSD/mips64
llvm-svn: 297098
-rw-r--r-- | clang/lib/Basic/Targets.cpp | 6 | ||||
-rw-r--r-- | clang/test/Preprocessor/init.c | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/clang/lib/Basic/Targets.cpp b/clang/lib/Basic/Targets.cpp index 3616baf61e9..95321ec3813 100644 --- a/clang/lib/Basic/Targets.cpp +++ b/clang/lib/Basic/Targets.cpp @@ -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; diff --git a/clang/test/Preprocessor/init.c b/clang/test/Preprocessor/init.c index 2ca05ae7c54..cae6aa042be 100644 --- a/clang/test/Preprocessor/init.c +++ b/clang/test/Preprocessor/init.c @@ -8766,6 +8766,8 @@ // 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 |