diff options
author | Morris Hafner <mmha@users.noreply.github.com> | 2025-08-19 09:16:11 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-08-19 09:16:11 +0200 |
commit | b44e47a68f9b49a6283b1beaab3af55fa39e8907 (patch) | |
tree | 5c7e8db13349137071a7bec1bd31f8d1bd1eb5b4 /clang/lib/CIR/CodeGen/CIRGenFunction.cpp | |
parent | eb7a1d91b28d4f83e41133aa2dcd92dae67f0279 (diff) | |
download | llvm-b44e47a68f9b49a6283b1beaab3af55fa39e8907.zip llvm-b44e47a68f9b49a6283b1beaab3af55fa39e8907.tar.gz llvm-b44e47a68f9b49a6283b1beaab3af55fa39e8907.tar.bz2 |
[CIR] Upstream __builtin_va_start and __builtin_va_end (#153819)
Part of #153286
Diffstat (limited to 'clang/lib/CIR/CodeGen/CIRGenFunction.cpp')
-rw-r--r-- | clang/lib/CIR/CodeGen/CIRGenFunction.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/CIR/CodeGen/CIRGenFunction.cpp b/clang/lib/CIR/CodeGen/CIRGenFunction.cpp index d6a0792..917afa8e 100644 --- a/clang/lib/CIR/CodeGen/CIRGenFunction.cpp +++ b/clang/lib/CIR/CodeGen/CIRGenFunction.cpp @@ -1080,4 +1080,10 @@ void CIRGenFunction::emitVariablyModifiedType(QualType type) { } while (type->isVariablyModifiedType()); } +Address CIRGenFunction::emitVAListRef(const Expr *e) { + if (getContext().getBuiltinVaListType()->isArrayType()) + return emitPointerWithAlignment(e); + return emitLValue(e).getAddress(); +} + } // namespace clang::CIRGen |