[PATCH] D85315: [AIX][Clang][Driver] Generate reference to the C++ library on the link step

Hubert Tong via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 6 14:49:36 PDT 2020


hubert.reinterpretcast added inline comments.


================
Comment at: clang/lib/Driver/ToolChains/AIX.cpp:210
+  case ToolChain::CST_Libstdcxx:
+    llvm::report_fatal_error("linking libstdc++ unimplemented on AIX");
+  }
----------------
Should there be a test for the error message?


================
Comment at: clang/lib/Driver/ToolChains/AIX.cpp:211
+    llvm::report_fatal_error("linking libstdc++ unimplemented on AIX");
+  }
+}
----------------
I suggest using `return` inside the switch and having `llvm_unreachable` after the `switch` if the `switch` is expected to handle all of the possible cases.


================
Comment at: clang/test/Driver/aix-ld.c:18
 // CHECK-LD32:     "-L[[SYSROOT]]/usr/lib"
 // CHECK-LD32:     "-lc"
 
----------------
Should there be tests that the C++ library is not included when linking with a C invocation?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D85315



More information about the cfe-commits mailing list