[llvm] [SYCL][LLVM] Adding property set I/O library for SYCL (PR #110771)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 14 22:19:37 PDT 2024
================
@@ -66,8 +66,13 @@ class SYCLPropertyValue {
return static_cast<Type>(T);
}
- ~SYCLPropertyValue() {}
-
+ ~SYCLPropertyValue() {
+ if (std::holds_alternative<std::byte *>(Val)) {
+ auto ByteArrayVal = std::get<std::byte *>(Val);
+ if (ByteArrayVal)
+ delete[] ByteArrayVal;
----------------
arsenm wrote:
Please just use unique_ptr
https://github.com/llvm/llvm-project/pull/110771
More information about the llvm-commits
mailing list