[PATCH] D106074: [AIX] Clang's library integration support for 128-bit long double is incomplete on AIX.

2021-07-22 Thread Shimin Cui via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGf719dff04396: [AIX] Clang's library integration support 
for 128-bit long double is incomplete… (authored by anjankgk, committed by 
scui).

Repository:
  rG LLVM Github Monorepo

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


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
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D96280: [clang][cli] Round-trip the whole CompilerInvocation

2021-02-25 Thread Shimin Cui via Phabricator via cfe-commits
scui added inline comments.



Comment at: clang/lib/Frontend/CompilerInvocation.cpp:666
+  // semantics as the original.
+  SmallVector GeneratedArgs1;
+  Generate(DummyInvocation, GeneratedArgs1, SA);

This is failing our build, This line and line 686. The msg is:

llvm-project/clang/lib/Frontend/CompilerInvocation.cpp:666:3: error: too few 
template arguments for class template 'SmallVector'
  SmallVector GeneratedArgs1;
  ^
llvm-project/clang/include/clang/Basic/LLVM.h:35:42: note: template is declared 
here
  template class SmallVector;
     ^
llvm-project/clang/lib/Frontend/CompilerInvocation.cpp:686:3: error: too few 
template arguments for class template 'SmallVector'
  SmallVector GeneratedArgs2;
  ^
llvm-project/clang/include/clang/Basic/LLVM.h:35:42: note: template is declared 
here
  template class SmallVector;
     ^
2 errors generated.



Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96280/new/

https://reviews.llvm.org/D96280

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D96280: [clang][cli] Round-trip the whole CompilerInvocation

2021-02-26 Thread Shimin Cui via Phabricator via cfe-commits
scui added inline comments.



Comment at: clang/lib/Frontend/CompilerInvocation.cpp:666
+  // semantics as the original.
+  SmallVector GeneratedArgs1;
+  Generate(DummyInvocation, GeneratedArgs1, SA);

jansvoboda11 wrote:
> scui wrote:
> > This is failing our build, This line and line 686. The msg is:
> > 
> > llvm-project/clang/lib/Frontend/CompilerInvocation.cpp:666:3: error: too 
> > few template arguments for class template 'SmallVector'
> >   SmallVector GeneratedArgs1;
> >   ^
> > llvm-project/clang/include/clang/Basic/LLVM.h:35:42: note: template is 
> > declared here
> >   template class SmallVector;
> >      ^
> > llvm-project/clang/lib/Frontend/CompilerInvocation.cpp:686:3: error: too 
> > few template arguments for class template 'SmallVector'
> >   SmallVector GeneratedArgs2;
> >   ^
> > llvm-project/clang/include/clang/Basic/LLVM.h:35:42: note: template is 
> > declared here
> >   template class SmallVector;
> >      ^
> > 2 errors generated.
> > 
> That's interesting, the definition of `SmallVector` defaults `N` to a 
> sensible number. Out of interest: what compiler are you using?
> 
> Should be fixed in 8dc70bdcd0fe4efb65876dce0144d9c3386a2f07.
Thanks for the quick fix. We are using the IBM XL compilers.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96280/new/

https://reviews.llvm.org/D96280

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits