[PATCH] D135791: [Clang] Do not crash when an invalid offload architecture is set

Joseph Huber via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 12 10:05:01 PDT 2022


jhuber6 created this revision.
jhuber6 added reviewers: jdoerfert, JonChesterfield, tra, yaxunl.
Herald added a project: All.
jhuber6 requested review of this revision.
Herald added subscribers: cfe-commits, MaskRay.
Herald added a project: clang.

If an invalid architecture is set we currently return an empty string.
This will cause the offloading toolchain to continue to be built and
hit an assertion elsewhere due to the invalid architecture. This patch
fixes that so we now correctly exit.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D135791

Files:
  clang/lib/Driver/Driver.cpp
  clang/test/Driver/cuda-phases.cu

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D135791.467181.patch
Type: text/x-patch
Size: 4378 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20221012/119f7d86/attachment.bin>


More information about the cfe-commits mailing list