From 6b5a61b6dc400027fd793dcadceeb9da944a37ea Mon Sep 17 00:00:00 2001 From: John McCall Date: Mon, 7 Feb 2011 10:33:21 +0000 Subject: A few more tweaks to the blocks AST representation: - BlockDeclRefExprs always store VarDecls - BDREs no longer store copy expressions - BlockDecls now store a list of captured variables, information about how they're captured, and a copy expression if necessary With that in hand, change IR generation to use the captures data in blocks instead of walking the block independently. Additionally, optimize block layout by emitting fields in descending alignment order, with a heuristic for filling in words when alignment of the end of the block header is insufficient for the most aligned field. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@125005 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGExpr.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib/CodeGen/CGExpr.cpp') diff --git a/lib/CodeGen/CGExpr.cpp b/lib/CodeGen/CGExpr.cpp index 2108e21ed3..4dd187f538 100644 --- a/lib/CodeGen/CGExpr.cpp +++ b/lib/CodeGen/CGExpr.cpp @@ -1300,7 +1300,9 @@ LValue CodeGenFunction::EmitPredefinedLValue(const PredefinedExpr *E) { CurDecl = getContext().getTranslationUnitDecl(); std::string FunctionName = - PredefinedExpr::ComputeName((PredefinedExpr::IdentType)Type, CurDecl); + (isa(CurDecl) + ? FnName.str() + : PredefinedExpr::ComputeName((PredefinedExpr::IdentType)Type, CurDecl)); llvm::Constant *C = CGM.GetAddrOfConstantCString(FunctionName, GlobalVarName.c_str()); -- cgit v1.2.3-18-g5258