[clang] [CUDA] Add device-side kernel launch support (PR #165519)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 24 20:07:30 PST 2025
================
@@ -165,6 +165,21 @@ void diagnosticHandler(const DiagnosticInfo &DI) {
}
}
+bool hasFatBinary(const ArgList &Args, MemoryBufferRef Buffer) {
+ if (Args.hasArg(OPT_dry_run) && Args.hasArg(OPT_assume_device_object))
+ return false;
+ if (identify_magic(Buffer.getBuffer()) != file_magic::elf_relocatable)
+ return false;
+ Expected<std::unique_ptr<ObjectFile>> ObjFile =
+ ObjectFile::createObjectFile(Buffer);
+ if (!ObjFile) {
+ (void)ObjFile.takeError();
----------------
darkbuck wrote:
> This is not how you ignore errors, this will cause the program to exit due to unhandled error. You want to either `consumeError` or `errorToBool` it.
done
https://github.com/llvm/llvm-project/pull/165519
More information about the cfe-commits
mailing list