[PATCH] D142660: [AIX] supporting -X options for llvm-ranlib in AIX OS

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 15 23:52:10 PDT 2023


MaskRay added inline comments.


================
Comment at: llvm/include/llvm/Object/ArchiveWriter.h:43
 
+enum SymtabWritingMode {
+  NoSymtab,     // Do not write symbol table.
----------------
Below you use `SymtabWritingMode::` for all members, so just make this enum scoped.


================
Comment at: llvm/tools/llvm-ar/llvm-ar.cpp:1452
+              fail(
+                  Twine("the specified object mode is not valid. Specify -X32, "
+                        "-X64, -X32_64, or -Xany"));
----------------
Remove `Twine(` and `)`. 


================
Comment at: llvm/tools/llvm-ar/llvm-ar.cpp:1474
+    if (!HasAIXXOption) {
+      char *EnvObjectMode = getenv("OBJECT_MODE");
+      if (EnvObjectMode) {
----------------
C++17 allows `if (char *EnvObjectMode = getenv("OBJECT_MODE"))`


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D142660



More information about the cfe-commits mailing list