1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00

[Attributor] Use sensible initialization in AANoCaptureCallSiteReturned

This commit is contained in:
Johannes Doerfert 2021-03-01 20:21:21 -06:00
parent f31243de74
commit a8bee9c76c

View File

@ -4478,6 +4478,13 @@ struct AANoCaptureCallSiteReturned final : AANoCaptureImpl {
AANoCaptureCallSiteReturned(const IRPosition &IRP, Attributor &A)
: AANoCaptureImpl(IRP, A) {}
/// See AbstractAttribute::initialize(...).
void initialize(Attributor &A) override {
const Function *F = getAnchorScope();
// Check what state the associated function can actually capture.
determineFunctionCaptureCapabilities(getIRPosition(), *F, *this);
}
/// See AbstractAttribute::trackStatistics()
void trackStatistics() const override {
STATS_DECLTRACK_CSRET_ATTR(nocapture)