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


================
Comment at: clang/include/clang/Driver/Driver.h:643
 
+/// Returns the driver mode option's value, i.e. `X` in `--driver-mode=X`. If 
\p
+/// Args doesn't mention one explicitly, tries to deduce from `ProgName`.
----------------
List the "good" values, and explicitly mention that it need not be one?


================
Comment at: clang/lib/Driver/Driver.cpp:1018
   // how other options are parsed.
-  ParseDriverMode(ClangExecutable, ArgList.slice(1));
+  setDriverMode(getDriverMode(ClangExecutable, ArgList.slice(1)));
 
----------------
can we do this only if we have a value to set to, and remove the "" special 
case?


================
Comment at: clang/lib/Tooling/InterpolatingCompilationDatabase.cpp:149
         TmpArgv.push_back(S.c_str());
+      ClangCLMode = !TmpArgv.empty() &&
+                    driver::getDriverMode(TmpArgv.front(),
----------------
could consider adding isClangCL(StringRef)... up to you


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D106789

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

Reply via email to