Author: Jameson Nash
Date: 2026-06-10T12:47:43-04:00
New Revision: e1abcb00a5d897987d71fcb012a5aaa928b826b8

URL: 
https://github.com/llvm/llvm-project/commit/e1abcb00a5d897987d71fcb012a5aaa928b826b8
DIFF: 
https://github.com/llvm/llvm-project/commit/e1abcb00a5d897987d71fcb012a5aaa928b826b8.diff

LOG: [clang] restore Alloca from CreateAggTemp (#202978)

Noticed in post-review feedback on #200427

Added: 
    

Modified: 
    clang/lib/CodeGen/CodeGenFunction.h

Removed: 
    


################################################################################
diff  --git a/clang/lib/CodeGen/CodeGenFunction.h 
b/clang/lib/CodeGen/CodeGenFunction.h
index 6bb9f285ebcfd..aeace0d789a61 100644
--- a/clang/lib/CodeGen/CodeGenFunction.h
+++ b/clang/lib/CodeGen/CodeGenFunction.h
@@ -2962,9 +2962,7 @@ class CodeGenFunction : public CodeGenTypeCache {
   /// aggregate type.
   AggValueSlot CreateAggTemp(QualType T, const Twine &Name = "tmp",
                              RawAddress *Alloca = nullptr) {
-    RawAddress Addr = CreateMemTemp(T, Name);
-    if (Alloca)
-      *Alloca = Addr;
+    RawAddress Addr = CreateMemTemp(T, Name, Alloca);
     return AggValueSlot::forAddr(
         Addr, T.getQualifiers(), AggValueSlot::IsNotDestructed,
         AggValueSlot::DoesNotNeedGCBarriers, AggValueSlot::IsNotAliased,


        
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to