From 57608c3728279917a401a97ef80fa533c86b062f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Micha=C5=82=20Petryka?= <35800402+MichalPetryka@users.noreply.github.com> Date: Fri, 7 Jul 2023 22:59:21 +0200 Subject: [PATCH] Print variable types when dumping the output (#88420) --- src/coreclr/jit/lclvars.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/coreclr/jit/lclvars.cpp b/src/coreclr/jit/lclvars.cpp index 1a64e29..5f6352d 100644 --- a/src/coreclr/jit/lclvars.cpp +++ b/src/coreclr/jit/lclvars.cpp @@ -7638,6 +7638,19 @@ void Compiler::lvaDumpEntry(unsigned lclNum, FrameLayoutState curState, size_t r } } + if (varDsc->lvClassHnd != NO_CLASS_HANDLE) + { + printf(" <%s>", eeGetClassName(varDsc->lvClassHnd)); + } + else if (varTypeIsStruct(varDsc->TypeGet())) + { + ClassLayout* layout = varDsc->GetLayout(); + if (layout != nullptr && !layout->IsBlockLayout()) + { + printf(" <%s>", layout->GetClassName()); + } + } + printf("\n"); } -- 2.7.4