[clang] [llvm] Reland "[DebugMetadata][DwarfDebug] Support function-local types in lexical block scopes (4/7)" (PR #165032)

Jeremy Morse via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 15 10:04:44 PST 2025


================
@@ -0,0 +1,49 @@
+// REQUIRES: asserts
+// Should trigger GenerateVarArgsThunk.
+// RUN: %clang_cc1 -O0 -triple riscv64-linux-gnu -debug-info-kind=limited -emit-llvm %s -o - | \
+// RUN: FileCheck %s
+
+// RUN: %clang_cc1 -O0 -triple riscv64-linux-gnu -debug-info-kind=limited -emit-obj %s -o - | \
+// RUN: llvm-dwarfdump --verify -
+
+// This test checks that the varargs thunk is correctly created if types of
+// DILocalVariables of the base function are unresolved at the cloning time.
----------------
jmorse wrote:

Could you elaborate on the test criteria -- as I understand it this test is to avoid a crash in a tricky situation where types have no full definition? If so, please say that explicitly, and what kind of `DILocalVariable` information should be produced (currently none / incorrect information).

(I'm thinking ahead to if/when this test fails and someone has to determine the intention behind it).

https://github.com/llvm/llvm-project/pull/165032


More information about the cfe-commits mailing list