hans added inline comments.

================
Comment at: clang/include/clang/Driver/Options.td:2209
+def fms_runtime_lib_EQ : Joined<["-"], "fms-runtime-lib=">, Group<f_Group>,
+  Flags<[NoXarchOption, CoreOption]>, HelpText<"Select Windows run-time 
library">;
 defm delayed_template_parsing : BoolFOption<"delayed-template-parsing",
----------------
Could this also list the allowed options? And maybe it could also have a 
DocBrief that explains how to use it?


================
Comment at: clang/lib/Driver/ToolChains/Clang.cpp:6480
 
+  // Process Windows runtime flags (equivalent to cl flags /MD, /MDd, /MT, 
/MTd)
+  if (Triple.isOSWindows()) {
----------------
Could we somehow re-use the logic in Clang::AddClangCLArgs()? Perhaps the main 
switch from that could be extracted to a function that could be called from 
here?


================
Comment at: clang/test/Driver/cl-runtime-flags.c:99
+
+// Check for clang versions of the /MD and /MT flags.
+
----------------
If we want these to behave as the /MD and /MT flags, maybe we can re-use the 
tests for those, so e.g. we'd do:


```
// RUN: %clang_cl -### /MD -- %s 2>&1 | FileCheck -check-prefix=CHECK-MD %s
// RUN: %clang -### -target ... -fms-runtime-lib=dll -- %s 2>&1 | FileCheck 
-check-prefix=CHECK-MD %s
// CHECK-MD-NOT: "-D_DEBUG"
// CHECK-MD: "-D_MT"
// CHECK-MD: "-D_DLL"
...
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D133457

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

Reply via email to