summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGExpr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/CodeGen/CGExpr.cpp')
-rw-r--r--clang/lib/CodeGen/CGExpr.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGExpr.cpp b/clang/lib/CodeGen/CGExpr.cpp
index f5ca2d09740..2579d5bd633 100644
--- a/clang/lib/CodeGen/CGExpr.cpp
+++ b/clang/lib/CodeGen/CGExpr.cpp
@@ -1972,6 +1972,10 @@ LValue CodeGenFunction::EmitPredefinedLValue(const PredefinedExpr *E) {
// Blocks use the mangled function name.
// FIXME: ComputeName should handle blocks.
FunctionName = FnName.str();
+ } else if (isa<CapturedDecl>(CurDecl)) {
+ // For a captured statement, the function name is its enclosing
+ // function name not the one compiler generated.
+ FunctionName = PredefinedExpr::ComputeName(IdentType, CurDecl);
} else {
FunctionName = PredefinedExpr::ComputeName(IdentType, CurDecl);
assert(cast<ConstantArrayType>(E->getType())->getSize() - 1 ==
OpenPOWER on IntegriCloud