================
@@ -32,7 +31,7 @@ void SYCLInstallationDetector::addSYCLIncludeArgs(
 
 // Unsupported options for SYCL device compilation.
 static ArrayRef<OptSpecifier> getUnsupportedOpts() {
-  return {
+  static std::vector<OptSpecifier> UnsupportedOpts = {
----------------
tahonermann wrote:

Declaring the function `constexpr` wouldn't address the lifetime issue that is 
fixed by this change. The function is called at run-time, so the data backing 
the array reference needs to persist until run-time. 

https://github.com/llvm/llvm-project/pull/121822
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to