[llvm] [llvm][NFC] Update LocalVarDef::CVRegister to fix size MS ABI (PR #140214)

Oliver Hunt via llvm-commits llvm-commits at lists.llvm.org
Fri May 16 00:47:48 PDT 2025


https://github.com/ojhunt created https://github.com/llvm/llvm-project/pull/140214

LocalVarDef::CVRegister being a uint16_t is not enough for the fields to be packed with the MS ABI.

This makes the field a 16 bit a uint32_t

>From d677ec1f6b8ec3828fb80470dcdf9144b1a716d8 Mon Sep 17 00:00:00 2001
From: Oliver Hunt <oliver at apple.com>
Date: Fri, 16 May 2025 00:45:36 -0700
Subject: [PATCH] [llvm][NFC] Update LocalVarDef::CVRegister to fix size MS ABI

---
 llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h
index be6eb4c8998bd..d13b315135ad9 100644
--- a/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h
+++ b/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h
@@ -70,7 +70,7 @@ class LLVM_LIBRARY_VISIBILITY CodeViewDebug : public DebugHandlerBase {
 
     /// Register containing the data or the register base of the memory
     /// location containing the data.
-    uint16_t CVRegister;
+    uint32_t CVRegister : 16;
 
     uint64_t static toOpaqueValue(const LocalVarDef DR) {
       uint64_t Val = 0;



More information about the llvm-commits mailing list