diff options
author | Fangrui Song <i@maskray.me> | 2023-05-30 11:21:17 -0700 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2023-05-30 11:21:17 -0700 |
commit | fbea5aada14315da14c2e296831b1cb1cc1ddd61 (patch) | |
tree | 868245dcd7a73e4e1fb4b7e1ef60241b122ca89f /lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h | |
parent | a2a51448c1c34ee1cd1c3ec3689e7a354bb0df7c (diff) | |
download | llvm-fbea5aada14315da14c2e296831b1cb1cc1ddd61.zip llvm-fbea5aada14315da14c2e296831b1cb1cc1ddd61.tar.gz llvm-fbea5aada14315da14c2e296831b1cb1cc1ddd61.tar.bz2 |
[Driver] Add ClangFlags::TargetSpecific to simplify err_drv_unsupported_opt_for_target processing
clang/lib/Driver/ToolChains/Clang.cpp has a lot of fragments like the following:
```
if (const Arg *A = Args.getLastArg(...)) {
if (Triple is xxx)
A->render(Args, CmdArgs);
else
D.Diag(diag::err_drv_unsupported_opt_for_target) << ...;
}
```
The problem is more apparent with a recent surge of AIX-specific options.
Introduce the TargetSpecific flag so that we can move the target-specific
options to ToolChains/*.cpp and ToolChains/Arch/*.cpp and overload the
warn_drv_unused_argument mechanism to give an err_drv_unsupported_opt_for_target
error.
Migrate -march=/-mcpu= and some AIX-specific options to use this simplified pattern.
Reviewed By: jansvoboda11
Differential Revision: https://reviews.llvm.org/D151590
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h')
0 files changed, 0 insertions, 0 deletions