[llvm] [AMDGPU] Tolerate AMDGPUTargetELFStreamer without initializeTargetID (PR #226495)
Tim Renouf via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 25 07:19:09 PDT 2026
================
@@ -209,6 +209,18 @@ class AMDGPUTargetELFStreamer final : public AMDGPUTargetStreamer {
unsigned getEFlagsV4();
unsigned getEFlagsV6();
+ // Override of AMDGPUTargetStreamer::getTargetID that tolerates
+ // initializeTargetID not having been called by initializing it here from our
+ // MCSubtargetInfo. This allows the use of AMDGPUTargetELFStreamer in an
----------------
trenouf wrote:
In particular, without the fix, the test asserts in AMDGPUTargetELFStreamer::getEFlagsV3() because getTargetID() returns an empty optional, which it then tries to call isXnackOnOrAny() etc on.
https://github.com/llvm/llvm-project/pull/226495
More information about the llvm-commits
mailing list