diff options
| author | Erich Keane <erich.keane@intel.com> | 2019-08-28 20:59:25 +0000 |
|---|---|---|
| committer | Erich Keane <erich.keane@intel.com> | 2019-08-28 20:59:25 +0000 |
| commit | 856f3fe5bbd6a6b204a4a293efdeba8d25fb1814 (patch) | |
| tree | 5628fed2f4cc7a8568fb4df767c805a87f8e527b /clang/lib/CodeGen/CodeGenFunction.cpp | |
| parent | a1178b862a8aa3fa8ba0ea48ab6aea2dd4d76587 (diff) | |
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.
llvm-svn: 370261
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
| -rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp index 4b7986f7162f..e3fb205232e0 100644 --- a/clang/lib/CodeGen/CodeGenFunction.cpp +++ b/clang/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; |
