[clang] [llvm] [ARM] Adding diagnostics for mcmodel=tiny when used in invalid targets (PR #125643)
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 16 09:06:46 PDT 2025
================
@@ -1755,6 +1755,18 @@ Compilation *Driver::BuildCompilation(ArrayRef<const char *> ArgList) {
<< TC.getTriple().str();
}
+ // Throw diagnosis if mcmodel=tiny option is passed for targets other than ARM
+ // or AArch64.
+ if (Arg *A = UArgs->getLastArg(options::OPT_mcmodel_EQ)) {
----------------
MaskRay wrote:
Move to clang/lib/Driver/ToolChains/CommonArgs.cpp `addMCModel`. You might delete add an early return to that function and run `check-clang-driver` to find relevant tests. Then follow that style and add one for Arm.
https://github.com/llvm/llvm-project/pull/125643
More information about the llvm-commits
mailing list