[PATCH] D107634: [clangd] Strip mutliple arch options

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 6 05:43:28 PDT 2021


sammccall accepted this revision.
sammccall added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clang-tools-extra/clangd/CompileCommands.cpp:225
 
+  llvm::SmallVector<unsigned, 1> IndicesToDrop;
+  // Having multiple architecture options (e.g. when building FAT binaries)
----------------
nit: llvm::SmallVector<unsigned> unless you're very sure about the 1


================
Comment at: clang-tools-extra/clangd/CompileCommands.cpp:226
+  llvm::SmallVector<unsigned, 1> IndicesToDrop;
+  // Having multiple architecture options (e.g. when building FAT binaries)
+  // results in multiple compiler jobs, which clangd cannot handle. In such
----------------
nit: fat isn't an acronym here


================
Comment at: clang-tools-extra/clangd/CompileCommands.cpp:228
+  // results in multiple compiler jobs, which clangd cannot handle. In such
+  // cases strip all the `-arch` options and fallback to host architecture. As
+  // there are no signals to figure out which one user actually wants. They can
----------------
s/host/default/


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D107634



More information about the cfe-commits mailing list