diff options
author | Diana Picus <diana.picus@linaro.org> | 2017-05-11 08:10:41 +0000 |
---|---|---|
committer | Diana Picus <diana.picus@linaro.org> | 2017-05-11 08:10:41 +0000 |
commit | 1f53d03a15d3ba35fa19ffeb08d5dce1392e3139 (patch) | |
tree | 98def9bbdb9a04dc403f04fdfe39c98855a0bb53 /clang/lib/CodeGen/CGExprAgg.cpp | |
parent | c5cc230587a01130ffe8a5a4b9e2779c25222984 (diff) | |
download | bcm5719-llvm-1f53d03a15d3ba35fa19ffeb08d5dce1392e3139.tar.gz bcm5719-llvm-1f53d03a15d3ba35fa19ffeb08d5dce1392e3139.zip |
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()
^
--
llvm-svn: 302776
Diffstat (limited to 'clang/lib/CodeGen/CGExprAgg.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGExprAgg.cpp | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/clang/lib/CodeGen/CGExprAgg.cpp b/clang/lib/CodeGen/CGExprAgg.cpp index a05a088f091..49bbb4808ea 100644 --- a/clang/lib/CodeGen/CGExprAgg.cpp +++ b/clang/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 = |