summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenFunction.cpp
diff options
context:
space:
mode:
authorErich Keane <erich.keane@intel.com>2019-08-28 20:59:25 +0000
committerErich Keane <erich.keane@intel.com>2019-08-28 20:59:25 +0000
commitfb0b88ae111d441128ad35e287fed3b56d704e21 (patch)
tree417254b84ffabf1d012dbc31299f53ef5f9702d4 /lib/CodeGen/CodeGenFunction.cpp
parent4c11f17103c599c2af4fffcd5d670e495119cc0c (diff)
downloadclang-fb0b88ae111d441128ad35e287fed3b56d704e21.tar.gz
Fix always_inline 'target' compatibility check code for Lambdas
The previous version of this used CurFuncDecl in CodeGenFunction, however this doesn't include lambdas. However, CurCodeDecl DOES. Switch the check to use CurCodeDecl so that the actual function being emitted gets checked, preventing an error in ISEL. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@370261 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r--lib/CodeGen/CodeGenFunction.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/CodeGenFunction.cpp b/lib/CodeGen/CodeGenFunction.cpp
index 4b7986f716..e3fb205232 100644
--- a/lib/CodeGen/CodeGenFunction.cpp
+++ b/lib/CodeGen/CodeGenFunction.cpp
@@ -2203,7 +2203,7 @@ void CodeGenFunction::checkTargetFeatures(SourceLocation Loc,
// Get the current enclosing function if it exists. If it doesn't
// we can't check the target features anyhow.
- const FunctionDecl *FD = dyn_cast_or_null<FunctionDecl>(CurFuncDecl);
+ const FunctionDecl *FD = dyn_cast_or_null<FunctionDecl>(CurCodeDecl);
if (!FD)
return;