Files
clang-p2996/llvm/lib/IR/AutoUpgrade.cpp
Stephen Tozer ed5fe66370 [RemoveDIs][BC] Reject intrinsic->record upgrades for old-format modules (#87494)
Fixes issue noted at: https://github.com/llvm/llvm-project/pull/86274

When loading bitcode lazily, we may request debug intrinsics be upgraded
to debug records during the module parsing phase; later on we perform
this upgrade when materializing the module functions. If we change the
module's debug info format between parsing and materializing however,
then the requested upgrade is no longer correct and leads to an
assertion. This patch fixes the issue by adding an extra check in the
autoupgrader to see if the upgrade is no longer suitable, and either
exit-out or fall back to the correct intrinsic->intrinsic upgrade if one
is required.
2024-04-04 10:53:36 +01:00

234 KiB