d908d9fcff
* Fix a regression from the 18.1.6 release, which could result in compiler crashes in the PPCMergeStringPool pass when compiling for PowerPC targets. * Fixes clang-format regressions (since 18.1.1) on breaking before a stream insertion operator (<<) when both operands are string literals. * Fixes a clang-format regression (since 17.0.6) on formatting goto labels in macro definitions. - Rebase llvm-do-not-install-static-libraries.patch. OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm18?expand=0&rev=17
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);
|
|
}
|
|
|