Skip to content

Commit 291824c

Browse files
committed
Define __LONG_DOUBLE_128__
1 parent e383d75 commit 291824c

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

clang/lib/Basic/Targets/Sparc.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,7 @@ void SparcV8TargetInfo::getTargetDefines(const LangOptions &Opts,
165165
Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_4");
166166
Builder.defineMacro("__GCC_HAVE_SYNC_COMPARE_AND_SWAP_8");
167167
}
168+
Builder.defineMacro("__LONG_DOUBLE_128__");
168169
}
169170

170171
void SparcV9TargetInfo::getTargetDefines(const LangOptions &Opts,

clang/test/Preprocessor/predefined-arch-macros.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4210,6 +4210,11 @@
42104210
// CHECK_SPARC-NOT: #define __sparcv9 1
42114211
// CHECK_SPARC-NOT: #define __sparcv9__ 1
42124212

4213+
// RUN: %clang -E -dM %s -o - 2>&1 \
4214+
// RUN: -target sparc-unknown-linux \
4215+
// RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_SPARC_LDBL
4216+
// CHECK_SPARC_LDBL: #define __LONG_DOUBLE_128__ 1
4217+
42134218
// RUN: %clang -mcpu=v9 -E -dM %s -o - 2>&1 \
42144219
// RUN: -target sparc-unknown-linux \
42154220
// RUN: | FileCheck -match-full-lines %s -check-prefix=CHECK_SPARC-V9

0 commit comments

Comments
 (0)