[all-commits] [llvm/llvm-project] d46715: clang: Emit error if assembler fails to construct ...
Matt Arsenault via All-commits
all-commits at lists.llvm.org
Wed Sep 17 16:22:19 PDT 2025
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: d46715aaa0203cc95f3749d386745ae293f0109f
https://github.com/llvm/llvm-project/commit/d46715aaa0203cc95f3749d386745ae293f0109f
Author: Matt Arsenault <Matthew.Arsenault at amd.com>
Date: 2025-09-18 (Thu, 18 Sep 2025)
Changed paths:
M clang/include/clang/Basic/DiagnosticFrontendKinds.td
M clang/tools/driver/cc1as_main.cpp
Log Message:
-----------
clang: Emit error if assembler fails to construct subtarget (#159219)
We do not have consistent or good error handling of this situation.
Some tools check for errors, some just assert. The backend has no
proper way of reporting an invalid subtarget specification.
MCSubtargetInfo
currently does unreasonable things like spam warnings to errs, and then
silently proceed in an invalid state. I have a patch which starts
returning
null on some invalid subtargets, but all the tools need to start
erroring
cleanly first. I don't think there is a reliable way to test this today.
It
would have to be an incomplete backend. Ideally we would thread through
some kind of error context from the target to report the reason it's
an invalid subtarget.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list