e16eeb0094
to libclang-cpp.so similar to libLLVM.so. This is required when multiple versions of the library are loaded into the same process. (boo#1219405, boo#1221183, boo#1233220) - Require libffi when we build openmp for offloading. - Correct target name for libomptarget in file list. - Update llvm16.keyring from upstream. OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm16?expand=0&rev=38
15 lines
567 B
Diff
15 lines
567 B
Diff
diff --git a/llvm/include/llvm/Support/Casting.h b/llvm/include/llvm/Support/Casting.h
|
|
index 4ff5865..19623f6 100644
|
|
--- a/llvm/include/llvm/Support/Casting.h
|
|
+++ b/llvm/include/llvm/Support/Casting.h
|
|
@@ -661,6 +661,9 @@ template <typename To, typename From>
|
|
template <typename To, typename From>
|
|
[[nodiscard]] inline decltype(auto) dyn_cast(From *Val) {
|
|
assert(detail::isPresent(Val) && "dyn_cast on a non-existent value");
|
|
+#if defined(__clang__) && defined(NDEBUG)
|
|
+ __builtin_assume(Val);
|
|
+#endif
|
|
return CastInfo<To, From *>::doCastIfPossible(Val);
|
|
}
|
|
|