yaxunl added inline comments.

================
Comment at: clang/include/clang/Basic/DiagnosticDriverKinds.td:121-123
+def warn_drv_unsupported_option_for_processor : Warning<
+  "ignoring '%0' option as it is not currently supported for processor '%1'">,
+  InGroup<OptionIgnored>;
----------------
arsenm wrote:
> I'm surprised there already isn't a warning for this?
I am surprised too. Before this patch, there is no check and no handling of 
unsupported target features in Clang. clang just blindly adds target features 
specified in the command line and relies on the backend to handle them properly.

This patch enables Clang to warn and ignore unsupported target features.


================
Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:146
+    return false;
+  return TargetFeature == "no-cumode";
+}
----------------
arsenm wrote:
> I don't understand the use of "no-cumode". Where is this defined?
This function is called by clang driver. The argument TargetFeature is the 
target feature command line option to be checked, with `-m` removed, e.g. 
`-mcumode` or `-mno-cumode` passed to this function as "cumode" or "no-cumode".


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

https://reviews.llvm.org/D145343

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

Reply via email to