summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGExprAgg.cpp
diff options
context:
space:
mode:
authorDiana Picus <diana.picus@linaro.org>2017-05-11 08:10:41 +0000
committerDiana Picus <diana.picus@linaro.org>2017-05-11 08:10:41 +0000
commit389e123d9f2ffdd30fe124270b7f4214bdcd0e5f (patch)
tree703110ba7f868b63343c5d0b724a70be683b0643 /lib/CodeGen/CGExprAgg.cpp
parent2ea821f2612cddaa76449bc2888462065f9bb024 (diff)
downloadclang-389e123d9f2ffdd30fe124270b7f4214bdcd0e5f.tar.gz
Revert "PR22877: When constructing an array via a constructor with a default argument in list-initialization, run cleanups for the default argument after each iteration of the initialization loop."
Revert "clang/test/CodeGenCXX/array-default-argument.cpp: Satisfy targets that have x86_thiscallcc." This reverts commit r302750 and its fixup r302757 because the test is still breaking on some of the ARM bots. array-default-argument.cpp:20:12: error: expected string not found in input // CHECK: {{call|invoke}}[[THISCALL:( x86_thiscallcc)?]] void @_ZN1AC1Ev([[TEMPORARY:.*]]) ^ <stdin>:18:1: note: scanning from here arrayctor.loop: ; preds = %arrayctor.loop, %entry ^ <stdin>:28:2: note: possible intended match here call void @_Z1fv() ^ -- git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@302776 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprAgg.cpp')
-rw-r--r--lib/CodeGen/CGExprAgg.cpp20
1 files changed, 6 insertions, 14 deletions
diff --git a/lib/CodeGen/CGExprAgg.cpp b/lib/CodeGen/CGExprAgg.cpp
index a05a088f09..49bbb4808e 100644
--- a/lib/CodeGen/CGExprAgg.cpp
+++ b/lib/CodeGen/CGExprAgg.cpp
@@ -512,20 +512,12 @@ void AggExprEmitter::EmitArrayInit(Address DestPtr, llvm::ArrayType *AType,
currentElement->addIncoming(element, entryBB);
// Emit the actual filler expression.
- {
- // C++1z [class.temporary]p5:
- // when a default constructor is called to initialize an element of
- // an array with no corresponding initializer [...] the destruction of
- // every temporary created in a default argument is sequenced before
- // the construction of the next array element, if any
- CodeGenFunction::RunCleanupsScope CleanupsScope(CGF);
- LValue elementLV =
- CGF.MakeAddrLValue(Address(currentElement, elementAlign), elementType);
- if (filler)
- EmitInitializationToLValue(filler, elementLV);
- else
- EmitNullInitializationToLValue(elementLV);
- }
+ LValue elementLV =
+ CGF.MakeAddrLValue(Address(currentElement, elementAlign), elementType);
+ if (filler)
+ EmitInitializationToLValue(filler, elementLV);
+ else
+ EmitNullInitializationToLValue(elementLV);
// Move on to the next element.
llvm::Value *nextElement =