diff --git a/llvm/include/llvm/Transforms/IPO/Attributor.h b/llvm/include/llvm/Transforms/IPO/Attributor.h --- a/llvm/include/llvm/Transforms/IPO/Attributor.h +++ b/llvm/include/llvm/Transforms/IPO/Attributor.h @@ -657,7 +657,7 @@ checkForallReturnedValues(std::function &Pred) const = 0; /// See AbstractAttribute::getAttrKind() - virtual Attribute::AttrKind getAttrKind() const override { return ID; } + Attribute::AttrKind getAttrKind() const override { return ID; } /// The identifier used by the Attributor for this class of attributes. static constexpr Attribute::AttrKind ID = Attribute::Returned; @@ -669,7 +669,7 @@ : AbstractAttribute(V, InfoCache) {} /// See AbstractAttribute::getAttrKind()/ - virtual Attribute::AttrKind getAttrKind() const override { return ID; } + Attribute::AttrKind getAttrKind() const override { return ID; } static constexpr Attribute::AttrKind ID = Attribute::NoUnwind; @@ -686,7 +686,7 @@ : AbstractAttribute(V, InfoCache) {} /// See AbstractAttribute::getAttrKind(). - virtual Attribute::AttrKind getAttrKind() const override { + Attribute::AttrKind getAttrKind() const override { return ID; } diff --git a/llvm/lib/Transforms/IPO/Attributor.cpp b/llvm/lib/Transforms/IPO/Attributor.cpp --- a/llvm/lib/Transforms/IPO/Attributor.cpp +++ b/llvm/lib/Transforms/IPO/Attributor.cpp @@ -355,22 +355,22 @@ /// } /// See AbstractAttribute::getManifestPosition(). - virtual ManifestPosition getManifestPosition() const override { + ManifestPosition getManifestPosition() const override { return MP_FUNCTION; } - virtual const std::string getAsStr() const override { + const std::string getAsStr() const override { return getAssumed() ? "nounwind" : "may-unwind"; } /// See AbstractAttribute::updateImpl(...). - virtual ChangeStatus updateImpl(Attributor &A) override; + ChangeStatus updateImpl(Attributor &A) override; /// See AANoUnwind::isAssumedNoUnwind(). - virtual bool isAssumedNoUnwind() const override { return getAssumed(); } + bool isAssumedNoUnwind() const override { return getAssumed(); } /// See AANoUnwind::isKnownNoUnwind(). - virtual bool isKnownNoUnwind() const override { return getKnown(); } + bool isKnownNoUnwind() const override { return getKnown(); } }; ChangeStatus AANoUnwindFunction::updateImpl(Attributor &A) { @@ -487,21 +487,21 @@ } /// See AbstractAttribute::manifest(...). - virtual ChangeStatus manifest(Attributor &A) override; + ChangeStatus manifest(Attributor &A) override; /// See AbstractAttribute::getState(...). - virtual AbstractState &getState() override { return *this; } + AbstractState &getState() override { return *this; } /// See AbstractAttribute::getState(...). - virtual const AbstractState &getState() const override { return *this; } + const AbstractState &getState() const override { return *this; } /// See AbstractAttribute::getManifestPosition(). - virtual ManifestPosition getManifestPosition() const override { + ManifestPosition getManifestPosition() const override { return MP_ARGUMENT; } /// See AbstractAttribute::updateImpl(Attributor &A). - virtual ChangeStatus updateImpl(Attributor &A) override; + ChangeStatus updateImpl(Attributor &A) override; /// Return the number of potential return values, -1 if unknown. size_t getNumReturnValues() const { @@ -514,11 +514,11 @@ Optional getAssumedUniqueReturnValue() const; /// See AbstractState::checkForallReturnedValues(...). - virtual bool + bool checkForallReturnedValues(std::function &Pred) const override; /// Pretty print the attribute similar to the IR representation. - virtual const std::string getAsStr() const override; + const std::string getAsStr() const override; /// See AbstractState::isAtFixpoint(). bool isAtFixpoint() const override { return IsFixed; }