From 5f8c0ca53dce0ee9f716906d264c951812380dc6 Mon Sep 17 00:00:00 2001 From: "Ivan A. Kosarev" Date: Tue, 10 Oct 2017 09:39:32 +0000 Subject: [CodeGen] Do not construct complete LValue base info in trivial cases Besides obvious code simplification, avoiding explicit creation of LValueBaseInfo objects makes it easier to make TBAA information to be part of such objects. This is part of D38126 reworked to be a separate patch to simplify review. Differential Revision: https://reviews.llvm.org/D38695 llvm-svn: 315289 --- clang/lib/CodeGen/CGBlocks.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'clang/lib/CodeGen/CGBlocks.cpp') diff --git a/clang/lib/CodeGen/CGBlocks.cpp b/clang/lib/CodeGen/CGBlocks.cpp index 6f8f356ad85..c4c5541e6a5 100644 --- a/clang/lib/CodeGen/CGBlocks.cpp +++ b/clang/lib/CodeGen/CGBlocks.cpp @@ -986,9 +986,8 @@ llvm::Value *CodeGenFunction::EmitBlockLiteral(const CGBlockInfo &blockInfo) { // FIXME: Pass a specific location for the expr init so that the store is // attributed to a reasonable location - otherwise it may be attributed to // locations of subexpressions in the initialization. - LValueBaseInfo BaseInfo(AlignmentSource::Decl, false); EmitExprAsInit(&l2r, &BlockFieldPseudoVar, - MakeAddrLValue(blockField, type, BaseInfo), + MakeAddrLValue(blockField, type, AlignmentSource::Decl), /*captured by init*/ false); } -- cgit v1.2.3