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

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


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-debuginfo

Author: Oliver Hunt (ojhunt)

<details>
<summary>Changes</summary>

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

---
Full diff: https://github.com/llvm/llvm-project/pull/140214.diff


1 Files Affected:

- (modified) llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h (+1-1) 


``````````diff
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;

``````````

</details>


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


More information about the llvm-commits mailing list