diff options
| author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2013-05-19 17:53:37 +0000 |
|---|---|---|
| committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2013-05-19 17:53:37 +0000 |
| commit | 826df14d7274ed8e637dcbd8e4bb3d8b89f7d175 (patch) | |
| tree | 4217e46db2ef97ba1787a796fbad1cb1cc173d83 /clang/lib/Basic | |
| parent | 5959ea39d065e98a4d9a59ae609ade2e363b3cdb (diff) | |
| download | bcm5719-llvm-826df14d7274ed8e637dcbd8e4bb3d8b89f7d175.tar.gz bcm5719-llvm-826df14d7274ed8e637dcbd8e4bb3d8b89f7d175.zip | |
OpenBSD/sparc64 uses long long for int64_t and intmax_t.
Other operating systems, including FreeBSD and NetBSD, use long.
llvm-svn: 182215
Diffstat (limited to 'clang/lib/Basic')
| -rw-r--r-- | clang/lib/Basic/Targets.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/clang/lib/Basic/Targets.cpp b/clang/lib/Basic/Targets.cpp index 0086f05bb48..496893885c6 100644 --- a/clang/lib/Basic/Targets.cpp +++ b/clang/lib/Basic/Targets.cpp @@ -4307,9 +4307,16 @@ public: "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; + + // OpenBSD uses long long for int64_t and intmax_t. + if (getTriple().getOS() == llvm::Triple::OpenBSD) { + IntMaxType = SignedLongLong; + UIntMaxType = UnsignedLongLong; + } else { + IntMaxType = SignedLong; + UIntMaxType = UnsignedLong; + } + Int64Type = IntMaxType; } virtual void getTargetDefines(const LangOptions &Opts, |

