summaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/Targets/PNaCl.cpp
diff options
context:
space:
mode:
authorVitaly Buka <vitalybuka@google.com>2024-06-24 23:42:47 -0700
committerVitaly Buka <vitalybuka@google.com>2024-06-24 23:42:47 -0700
commit748fe87a8e0ccce436e9c94d8d163f9e03c81b48 (patch)
tree508d1619316f1cda23b7f7844a1c3b19d77face2 /clang/lib/CodeGen/Targets/PNaCl.cpp
parent46b525389c09ae37c34648c7f108374b815a6507 (diff)
parent43d207addaf4111dd6a4e0e702e8797587ce61ba (diff)
[𝘀𝗽𝗿] changes introduced through rebaseusers/vitalybuka/spr/main.sanitizer-rename-define_real_pthread_functions
Created using spr 1.3.4 [skip ci]
Diffstat (limited to 'clang/lib/CodeGen/Targets/PNaCl.cpp')
-rw-r--r--clang/lib/CodeGen/Targets/PNaCl.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/clang/lib/CodeGen/Targets/PNaCl.cpp b/clang/lib/CodeGen/Targets/PNaCl.cpp
index 771aa7469da2..9b7d757df3a3 100644
--- a/clang/lib/CodeGen/Targets/PNaCl.cpp
+++ b/clang/lib/CodeGen/Targets/PNaCl.cpp
@@ -27,8 +27,8 @@ class PNaClABIInfo : public ABIInfo {
ABIArgInfo classifyArgumentType(QualType RetTy) const;
void computeInfo(CGFunctionInfo &FI) const override;
- Address EmitVAArg(CodeGenFunction &CGF,
- Address VAListAddr, QualType Ty) const override;
+ RValue EmitVAArg(CodeGenFunction &CGF, Address VAListAddr, QualType Ty,
+ AggValueSlot Slot) const override;
};
class PNaClTargetCodeGenInfo : public TargetCodeGenInfo {
@@ -45,15 +45,18 @@ void PNaClABIInfo::computeInfo(CGFunctionInfo &FI) const {
I.info = classifyArgumentType(I.type);
}
-Address PNaClABIInfo::EmitVAArg(CodeGenFunction &CGF, Address VAListAddr,
- QualType Ty) const {
+RValue PNaClABIInfo::EmitVAArg(CodeGenFunction &CGF, Address VAListAddr,
+ QualType Ty, AggValueSlot Slot) const {
// The PNaCL ABI is a bit odd, in that varargs don't use normal
// function classification. Structs get passed directly for varargs
// functions, through a rewriting transform in
// pnacl-llvm/lib/Transforms/NaCl/ExpandVarArgs.cpp, which allows
// this target to actually support a va_arg instructions with an
// aggregate type, unlike other targets.
- return EmitVAArgInstr(CGF, VAListAddr, Ty, ABIArgInfo::getDirect());
+ return CGF.EmitLoadOfAnyValue(
+ CGF.MakeAddrLValue(
+ EmitVAArgInstr(CGF, VAListAddr, Ty, ABIArgInfo::getDirect()), Ty),
+ Slot);
}
/// Classify argument of given type \p Ty.