[llvm] [libsycl] Fix debug build error caused by RTTI option mismatch (PR #210997)

Yury Plyakhin via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 7 07:55:37 PDT 2026


================
@@ -50,7 +50,7 @@ void ProgramAndKernelManager::registerFatBin(const void *BinaryStart,
       /*Identifier=*/"");
   auto BinOrErr = llvm::object::OffloadBinary::create(MBR);
   if (!BinOrErr) {
-    llvm::consumeError(BinOrErr.takeError());
+    consumeBinaryError(BinOrErr);
     throw sycl::exception(sycl::make_error_code(sycl::errc::runtime),
                           "Failed to parse OffloadBinary");
----------------
YuriPlyakhin wrote:

llvm::toString consumes. It calls `handleAllErrors`, same as `consumeError`. It works because it's defined in `.cpp` rather than inline in the header — so the `handleErrors` templates (and the `ErrorList` vtable that carries the typeinfo pointer) are instantiated in LLVM's own TU, compiled with LLVM's RTTI setting, instead of in ours.

https://github.com/llvm/llvm-project/pull/210997


More information about the llvm-commits mailing list