[PATCH] D106074: [AIX] Clang's library integration support for 128-bit long double is incomplete on AIX.
Anjan Kumar via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 19 14:43:38 PDT 2021
anjankgk updated this revision to Diff 359926.
anjankgk retitled this revision from "[AIX] Emit unsupported 128-bit long double option for AIX" to "[AIX] Clang's library integration support for 128-bit long double is incomplete on AIX.".
anjankgk edited the summary of this revision.
anjankgk added a comment.
Updated the comment
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D106074/new/
https://reviews.llvm.org/D106074
Files:
clang/lib/Driver/ToolChains/Clang.cpp
clang/test/Driver/unsupported-option.c
Index: clang/test/Driver/unsupported-option.c
===================================================================
--- clang/test/Driver/unsupported-option.c
+++ clang/test/Driver/unsupported-option.c
@@ -21,3 +21,11 @@
// RUN: not %clang -fprofile-generate -flto=thin --target=powerpc64-ibm-aix %s 2>&1 | \
// RUN: FileCheck %s --check-prefix=AIX-PROFILE-THINLTO
// AIX-PROFILE-THINLTO: error: invalid argument '-fprofile-generate' only allowed with '-flto'
+
+// RUN: not %clang --target=powerpc-ibm-aix %s -mlong-double-128 2>&1 | \
+// RUN: FileCheck %s --check-prefix=AIX-LONGDOUBLE128-ERR
+// AIX-LONGDOUBLE128-ERR: error: unsupported option '-mlong-double-128' for target 'powerpc-ibm-aix'
+
+// RUN: not %clang --target=powerpc64-ibm-aix %s -mlong-double-128 2>&1 | \
+// RUN: FileCheck %s --check-prefix=AIX64-LONGDOUBLE128-ERR
+// AIX64-LONGDOUBLE128-ERR: error: unsupported option '-mlong-double-128' for target 'powerpc64-ibm-aix'
Index: clang/lib/Driver/ToolChains/Clang.cpp
===================================================================
--- clang/lib/Driver/ToolChains/Clang.cpp
+++ clang/lib/Driver/ToolChains/Clang.cpp
@@ -4841,6 +4841,14 @@
CmdArgs.push_back("-mabi=vec-default");
}
+ if (Arg *A = Args.getLastArg(options::OPT_mlong_double_128)) {
+ // Emit the unsupported option error until the Clang's library integration
+ // support for 128-bit long double is available for AIX.
+ if (Triple.isOSAIX())
+ D.Diag(diag::err_drv_unsupported_opt_for_target)
+ << A->getSpelling() << RawTriple.str();
+ }
+
if (Arg *A = Args.getLastArg(options::OPT_Wframe_larger_than_EQ)) {
StringRef v = A->getValue();
// FIXME: Validate the argument here so we don't produce meaningless errors
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D106074.359926.patch
Type: text/x-patch
Size: 1754 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210719/3584bef9/attachment.bin>
More information about the cfe-commits
mailing list