[clang] 916b750 - [CodeGen] Use existing EmitLambdaVLACapture (NFC)

Aaron Puchert via cfe-commits cfe-commits at lists.llvm.org
Wed Aug 19 06:20:32 PDT 2020


Author: Aaron Puchert
Date: 2020-08-19T15:20:05+02:00
New Revision: 916b750a8d1ab47d41939b42bf1d6eeddbdef686

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

LOG: [CodeGen] Use existing EmitLambdaVLACapture (NFC)

Added: 
    

Modified: 
    clang/lib/CodeGen/CGStmt.cpp

Removed: 
    


################################################################################
diff  --git a/clang/lib/CodeGen/CGStmt.cpp b/clang/lib/CodeGen/CGStmt.cpp
index c2bd17a238d0..9dd79469b544 100644
--- a/clang/lib/CodeGen/CGStmt.cpp
+++ b/clang/lib/CodeGen/CGStmt.cpp
@@ -2418,8 +2418,7 @@ LValue CodeGenFunction::InitCapturedStruct(const CapturedStmt &S) {
        I != E; ++I, ++CurField) {
     LValue LV = EmitLValueForFieldInitialization(SlotLV, *CurField);
     if (CurField->hasCapturedVLAType()) {
-      auto VAT = CurField->getCapturedVLAType();
-      EmitStoreThroughLValue(RValue::get(VLASizeMap[VAT->getSizeExpr()]), LV);
+      EmitLambdaVLACapture(CurField->getCapturedVLAType(), LV);
     } else {
       EmitInitializerForField(*CurField, LV, *I);
     }


        


More information about the cfe-commits mailing list