https://github.com/CoTinker updated
https://github.com/llvm/llvm-project/pull/86075
>From 85d829dcef3484892d6db8f6a0329cb9bc34c349 Mon Sep 17 00:00:00 2001
From: Longsheng Mou
Date: Thu, 21 Mar 2024 11:23:56 +0800
Subject: [PATCH] [X86_32] Teach X86_32 va_arg to ignore empty structs.
Empty str
https://github.com/CoTinker updated
https://github.com/llvm/llvm-project/pull/86075
>From 95a11789d89a57cc96512bd180949164f89695d0 Mon Sep 17 00:00:00 2001
From: Longsheng Mou
Date: Thu, 21 Mar 2024 11:23:56 +0800
Subject: [PATCH] [X86_32] Teach X86_32 va_arg to ignore empty structs.
Empty str
https://github.com/CoTinker updated
https://github.com/llvm/llvm-project/pull/86075
>From 355f540288d87ca35a8e5790e4eaff383d619201 Mon Sep 17 00:00:00 2001
From: Longsheng Mou
Date: Thu, 21 Mar 2024 11:23:56 +0800
Subject: [PATCH] [X86_32] Teach X86_32 va_arg to ignore empty structs.
Empty str
https://github.com/CoTinker updated
https://github.com/llvm/llvm-project/pull/86075
>From a4d9a6fefdbe7c0ee6a891af230438a10ddd7c5a Mon Sep 17 00:00:00 2001
From: Longsheng Mou
Date: Thu, 21 Mar 2024 11:23:56 +0800
Subject: [PATCH] [X86_32] Teach X86_32 va_arg to ignore empty structs.
Empty str
https://github.com/CoTinker updated
https://github.com/llvm/llvm-project/pull/86075
>From 929fba43012209b74b654b8d9a017a43826063fe Mon Sep 17 00:00:00 2001
From: Longsheng Mou
Date: Thu, 21 Mar 2024 11:23:56 +0800
Subject: [PATCH] [X86_32] Teach X86_32 va_arg to ignore empty structs.
Empty str
efriedma-quic wrote:
(Please fix the formatting issue before merging)
https://github.com/llvm/llvm-project/pull/86075
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/efriedma-quic approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/86075
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
github-actions[bot] wrote:
:warning: C/C++ code formatter, clang-format found issues in your code.
:warning:
You can test this locally with the following command:
``bash
git-clang-format --diff 44a81af510801edce842e9574ec4d52cc7bd0ae9
5178a001cc3ce765e3d29e91e24597fa1b0f42d6 --
https://github.com/CoTinker updated
https://github.com/llvm/llvm-project/pull/86075
>From 5178a001cc3ce765e3d29e91e24597fa1b0f42d6 Mon Sep 17 00:00:00 2001
From: Longsheng Mou
Date: Thu, 21 Mar 2024 11:23:56 +0800
Subject: [PATCH] [X86_32] Teach X86_32 va_arg to ignore empty structs.
Empty str
@@ -1069,6 +1069,10 @@ Address X86_32ABIInfo::EmitVAArg(CodeGenFunction &CGF,
auto TypeInfo = getContext().getTypeInfoInChars(Ty);
+ // Empty records are ignored for parameter passing purposes on non-Windows.
+ if (!IsWin32StructABI && isEmptyRecord(getContext(), Ty, true
@@ -1069,6 +1069,10 @@ Address X86_32ABIInfo::EmitVAArg(CodeGenFunction &CGF,
auto TypeInfo = getContext().getTypeInfoInChars(Ty);
+ // Empty records are ignored for parameter passing purposes on non-Windows.
+ if (!IsWin32StructABI && isEmptyRecord(getContext(), Ty, true
@@ -1069,6 +1069,10 @@ Address X86_32ABIInfo::EmitVAArg(CodeGenFunction &CGF,
auto TypeInfo = getContext().getTypeInfoInChars(Ty);
+ // Empty records are ignored for parameter passing purposes on non-Windows.
+ if (!IsWin32StructABI && isEmptyRecord(getContext(), Ty, true
llvmbot wrote:
@llvm/pr-subscribers-clang
@llvm/pr-subscribers-clang-codegen
Author: Longsheng Mou (CoTinker)
Changes
Empty structs are ignored for parameter passing purposes, but va_arg was
incrementing the pointer anyway for that the size of empty struct in c++ is 1
byte, which could l
https://github.com/CoTinker created
https://github.com/llvm/llvm-project/pull/86075
Empty structs are ignored for parameter passing purposes, but va_arg was
incrementing the pointer anyway for that the size of empty struct in c++ is 1
byte, which could lead to va_list getting out of sync. Fix
14 matches
Mail list logo