[llvm] [DebugInfo] SizeInBits and AlignInBits are erroneously swapped (PR #100402)

Rose Silicon via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 5 22:35:01 PDT 2024


https://github.com/RSilicon updated https://github.com/llvm/llvm-project/pull/100402

>From e577c876650156f4be587311a75b4c64acd9bb59 Mon Sep 17 00:00:00 2001
From: AtariDreams <gfunni234 at gmail.com>
Date: Wed, 24 Jul 2024 11:16:47 -0400
Subject: [PATCH] [DebugInfo] SizeInBits and AlignInBits are erroneously
 swapped

They are being passed in the wrong order.
---
 llvm/lib/IR/DebugInfo.cpp | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/llvm/lib/IR/DebugInfo.cpp b/llvm/lib/IR/DebugInfo.cpp
index e50b6f6335ef5f..fafd247ad868d0 100644
--- a/llvm/lib/IR/DebugInfo.cpp
+++ b/llvm/lib/IR/DebugInfo.cpp
@@ -1511,9 +1511,8 @@ LLVMDIBuilderCreateMemberPointerType(LLVMDIBuilderRef Builder,
                                      uint32_t AlignInBits,
                                      LLVMDIFlags Flags) {
   return wrap(unwrap(Builder)->createMemberPointerType(
-                  unwrapDI<DIType>(PointeeType),
-                  unwrapDI<DIType>(ClassType), AlignInBits, SizeInBits,
-                  map_from_llvmDIFlags(Flags)));
+      unwrapDI<DIType>(PointeeType), unwrapDI<DIType>(ClassType), SizeInBits,
+      AlignInBits, map_from_llvmDIFlags(Flags)));
 }
 
 LLVMMetadataRef



More information about the llvm-commits mailing list