[RemoveDIs][Clang] Resolve DILocalVariables used by DbgRecords (#90882)
This patch fixes debug records in clang, by adding support for debug records to the only remaining place that refers to DbgVariableIntrinsics directly and does not handle DbgVariableRecords.
This commit is contained in:
@@ -131,6 +131,12 @@ static void resolveTopLevelMetadata(llvm::Function *Fn,
|
||||
// they are referencing.
|
||||
for (auto &BB : *Fn) {
|
||||
for (auto &I : BB) {
|
||||
for (llvm::DbgVariableRecord &DVR :
|
||||
llvm::filterDbgVars(I.getDbgRecordRange())) {
|
||||
auto *DILocal = DVR.getVariable();
|
||||
if (!DILocal->isResolved())
|
||||
DILocal->resolve();
|
||||
}
|
||||
if (auto *DII = dyn_cast<llvm::DbgVariableIntrinsic>(&I)) {
|
||||
auto *DILocal = DII->getVariable();
|
||||
if (!DILocal->isResolved())
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
// REQUIRES: asserts
|
||||
// RUN: %clang_cc1 -O0 -triple %itanium_abi_triple -debug-info-kind=limited -S -emit-llvm %s -o - | \
|
||||
// RUN: FileCheck %s
|
||||
// RUN: %clang_cc1 -O0 -triple %itanium_abi_triple -debug-info-kind=limited -S -emit-llvm -mllvm --experimental-debuginfo-iterators=true %s -o - | \
|
||||
// RUN: FileCheck %s
|
||||
|
||||
// This test simply checks that the varargs thunk is created. The failing test
|
||||
// case asserts.
|
||||
|
||||
Reference in New Issue
Block a user