[all-commits] [llvm/llvm-project] 30588a: Make target features check work with ctor and dtor-
Erich Keane via All-commits
all-commits at lists.llvm.org
Wed Apr 8 13:20:44 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 30588a739584bb8ac41715d68656d22bd85198e7
https://github.com/llvm/llvm-project/commit/30588a739584bb8ac41715d68656d22bd85198e7
Author: Erich Keane <erich.keane at intel.com>
Date: 2020-04-08 (Wed, 08 Apr 2020)
Changed paths:
M clang/lib/CodeGen/CGClass.cpp
M clang/lib/CodeGen/CGExprCXX.cpp
M clang/lib/CodeGen/CodeGenFunction.cpp
M clang/test/CodeGenCXX/target-features-error.cpp
Log Message:
-----------
Make target features check work with ctor and dtor-
The problem was reported in PR45468, applying target features to an
always_inline constructor/destructor runs afoul of GlobalDecl
construction assert when checking for target-feature compatibility.
The core problem is fixed by using the version of the check that takes a
FunctionDecl rather than the GlobalDecl. However, while writing the
test, I discovered that source locations weren't properly set for this
check on ctors/dtors. This patch also fixes constructors and CALLED destructors.
Unfortunately, it doesn't seem too possible to get a meaningful source
location for a 'cleanup' destructor, so those are still 'frontend' level
errors unfortunately. A fixme was added to the test to cover that
situation.
More information about the All-commits
mailing list