forked from OSchip/llvm-project
Apply clang-tidy fixes for modernize-use-equals-default to MLIR (NFC)
This commit is contained in:
parent
59d8740f2f
commit
9940dcfa4a
|
@ -180,7 +180,7 @@ struct AliasAnalysisTraits {
|
||||||
/// querying into derived analysis implementations.
|
/// querying into derived analysis implementations.
|
||||||
class Concept {
|
class Concept {
|
||||||
public:
|
public:
|
||||||
virtual ~Concept() {}
|
virtual ~Concept() = default;
|
||||||
|
|
||||||
/// Given two values, return their aliasing behavior.
|
/// Given two values, return their aliasing behavior.
|
||||||
virtual AliasResult alias(Value lhs, Value rhs) = 0;
|
virtual AliasResult alias(Value lhs, Value rhs) = 0;
|
||||||
|
|
|
@ -35,7 +35,7 @@ class AffineValueMap {
|
||||||
public:
|
public:
|
||||||
// Creates an empty AffineValueMap (users should call 'reset' to reset map
|
// Creates an empty AffineValueMap (users should call 'reset' to reset map
|
||||||
// and operands).
|
// and operands).
|
||||||
AffineValueMap() {}
|
AffineValueMap() = default;
|
||||||
AffineValueMap(AffineMap map, ValueRange operands, ValueRange results = {});
|
AffineValueMap(AffineMap map, ValueRange operands, ValueRange results = {});
|
||||||
|
|
||||||
~AffineValueMap();
|
~AffineValueMap();
|
||||||
|
|
|
@ -67,7 +67,7 @@ std::unique_ptr<AllocationCallbacks> defaultAllocationCallbacks();
|
||||||
/// executed after the analysis, but before bufferization. They can be used to
|
/// executed after the analysis, but before bufferization. They can be used to
|
||||||
/// implement custom dialect-specific optimizations.
|
/// implement custom dialect-specific optimizations.
|
||||||
struct PostAnalysisStep {
|
struct PostAnalysisStep {
|
||||||
virtual ~PostAnalysisStep() {}
|
virtual ~PostAnalysisStep() = default;
|
||||||
|
|
||||||
/// Run the post analysis step. This function may modify the IR, but must keep
|
/// Run the post analysis step. This function may modify the IR, but must keep
|
||||||
/// `aliasInfo` consistent. Newly created operations and operations that
|
/// `aliasInfo` consistent. Newly created operations and operations that
|
||||||
|
|
|
@ -120,7 +120,7 @@ public:
|
||||||
return isSigned ? qValue.getSExtValue() : qValue.getZExtValue();
|
return isSigned ? qValue.getSExtValue() : qValue.getZExtValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ~UniformQuantizedValueConverter() {}
|
virtual ~UniformQuantizedValueConverter() = default;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// An optimized implementation to quantize f32 to i8/u8 with C++ native
|
// An optimized implementation to quantize f32 to i8/u8 with C++ native
|
||||||
|
|
|
@ -39,7 +39,7 @@ class AffineMap {
|
||||||
public:
|
public:
|
||||||
using ImplType = detail::AffineMapStorage;
|
using ImplType = detail::AffineMapStorage;
|
||||||
|
|
||||||
constexpr AffineMap() {}
|
constexpr AffineMap() = default;
|
||||||
explicit AffineMap(ImplType *map) : map(map) {}
|
explicit AffineMap(ImplType *map) : map(map) {}
|
||||||
|
|
||||||
/// Returns a zero result affine map with no dimensions or symbols: () -> ().
|
/// Returns a zero result affine map with no dimensions or symbols: () -> ().
|
||||||
|
@ -323,7 +323,7 @@ inline ::llvm::hash_code hash_value(AffineMap arg) {
|
||||||
/// A mutable affine map. Its affine expressions are however unique.
|
/// A mutable affine map. Its affine expressions are however unique.
|
||||||
struct MutableAffineMap {
|
struct MutableAffineMap {
|
||||||
public:
|
public:
|
||||||
MutableAffineMap() {}
|
MutableAffineMap() = default;
|
||||||
MutableAffineMap(AffineMap map);
|
MutableAffineMap(AffineMap map);
|
||||||
|
|
||||||
ArrayRef<AffineExpr> getResults() const { return results; }
|
ArrayRef<AffineExpr> getResults() const { return results; }
|
||||||
|
|
|
@ -29,7 +29,7 @@ class ValueTypeRange;
|
||||||
class Block : public IRObjectWithUseList<BlockOperand>,
|
class Block : public IRObjectWithUseList<BlockOperand>,
|
||||||
public llvm::ilist_node_with_parent<Block, Region> {
|
public llvm::ilist_node_with_parent<Block, Region> {
|
||||||
public:
|
public:
|
||||||
explicit Block() {}
|
explicit Block() = default;
|
||||||
~Block();
|
~Block();
|
||||||
|
|
||||||
void clear() {
|
void clear() {
|
||||||
|
|
|
@ -109,7 +109,7 @@ private:
|
||||||
/// This allows for all iterator and element types to be completely
|
/// This allows for all iterator and element types to be completely
|
||||||
/// type-erased.
|
/// type-erased.
|
||||||
struct OpaqueIteratorBase {
|
struct OpaqueIteratorBase {
|
||||||
virtual ~OpaqueIteratorBase() {}
|
virtual ~OpaqueIteratorBase() = default;
|
||||||
virtual std::unique_ptr<OpaqueIteratorBase> clone() const = 0;
|
virtual std::unique_ptr<OpaqueIteratorBase> clone() const = 0;
|
||||||
};
|
};
|
||||||
/// This class is used to represent the abstract base of an opaque iterator
|
/// This class is used to represent the abstract base of an opaque iterator
|
||||||
|
|
|
@ -33,7 +33,7 @@ class PatternBenefit {
|
||||||
enum { ImpossibleToMatchSentinel = 65535 };
|
enum { ImpossibleToMatchSentinel = 65535 };
|
||||||
|
|
||||||
public:
|
public:
|
||||||
PatternBenefit() {}
|
PatternBenefit() = default;
|
||||||
PatternBenefit(unsigned benefit);
|
PatternBenefit(unsigned benefit);
|
||||||
PatternBenefit(const PatternBenefit &) = default;
|
PatternBenefit(const PatternBenefit &) = default;
|
||||||
PatternBenefit &operator=(const PatternBenefit &) = default;
|
PatternBenefit &operator=(const PatternBenefit &) = default;
|
||||||
|
@ -243,7 +243,7 @@ private:
|
||||||
///
|
///
|
||||||
class RewritePattern : public Pattern {
|
class RewritePattern : public Pattern {
|
||||||
public:
|
public:
|
||||||
virtual ~RewritePattern() {}
|
virtual ~RewritePattern() = default;
|
||||||
|
|
||||||
/// Rewrite the IR rooted at the specified operation with the result of
|
/// Rewrite the IR rooted at the specified operation with the result of
|
||||||
/// this pattern, generating any new operations with the specified
|
/// this pattern, generating any new operations with the specified
|
||||||
|
|
|
@ -77,7 +77,7 @@ private:
|
||||||
/// class represents an abstract interface for a given resource.
|
/// class represents an abstract interface for a given resource.
|
||||||
class Resource {
|
class Resource {
|
||||||
public:
|
public:
|
||||||
virtual ~Resource() {}
|
virtual ~Resource() = default;
|
||||||
|
|
||||||
/// This base class is used for derived effects that are non-parametric.
|
/// This base class is used for derived effects that are non-parametric.
|
||||||
template <typename DerivedResource, typename BaseResource = Resource>
|
template <typename DerivedResource, typename BaseResource = Resource>
|
||||||
|
|
|
@ -48,7 +48,7 @@ public:
|
||||||
/// This class represents the base class of a debug action handler.
|
/// This class represents the base class of a debug action handler.
|
||||||
class HandlerBase {
|
class HandlerBase {
|
||||||
public:
|
public:
|
||||||
virtual ~HandlerBase() {}
|
virtual ~HandlerBase() = default;
|
||||||
|
|
||||||
/// Return the unique handler id of this handler, use for casting
|
/// Return the unique handler id of this handler, use for casting
|
||||||
/// functionality.
|
/// functionality.
|
||||||
|
|
|
@ -184,8 +184,8 @@ private:
|
||||||
/// manager implementations.
|
/// manager implementations.
|
||||||
class Timer {
|
class Timer {
|
||||||
public:
|
public:
|
||||||
Timer() {}
|
Timer() = default;
|
||||||
Timer(const Timer &other) : tm(other.tm), handle(other.handle) {}
|
Timer(const Timer &other) = default;
|
||||||
Timer(Timer &&other) : Timer(other) {
|
Timer(Timer &&other) : Timer(other) {
|
||||||
other.tm = nullptr;
|
other.tm = nullptr;
|
||||||
other.handle = nullptr;
|
other.handle = nullptr;
|
||||||
|
|
|
@ -191,7 +191,7 @@ public:
|
||||||
/// Common CRTP base class for ModuleTranslation stack frames.
|
/// Common CRTP base class for ModuleTranslation stack frames.
|
||||||
class StackFrame {
|
class StackFrame {
|
||||||
public:
|
public:
|
||||||
virtual ~StackFrame() {}
|
virtual ~StackFrame() = default;
|
||||||
TypeID getTypeID() const { return typeID; }
|
TypeID getTypeID() const { return typeID; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
|
@ -56,7 +56,7 @@ public:
|
||||||
}
|
}
|
||||||
PyObjectRef(const PyObjectRef &other)
|
PyObjectRef(const PyObjectRef &other)
|
||||||
: referrent(other.referrent), object(other.object /* copies */) {}
|
: referrent(other.referrent), object(other.object /* copies */) {}
|
||||||
~PyObjectRef() {}
|
~PyObjectRef() = default;
|
||||||
|
|
||||||
int getRefCount() {
|
int getRefCount() {
|
||||||
if (!object)
|
if (!object)
|
||||||
|
|
|
@ -27,7 +27,7 @@ class AsmParserImpl : public BaseT {
|
||||||
public:
|
public:
|
||||||
AsmParserImpl(llvm::SMLoc nameLoc, Parser &parser)
|
AsmParserImpl(llvm::SMLoc nameLoc, Parser &parser)
|
||||||
: nameLoc(nameLoc), parser(parser) {}
|
: nameLoc(nameLoc), parser(parser) {}
|
||||||
~AsmParserImpl() override {}
|
~AsmParserImpl() override = default;
|
||||||
|
|
||||||
/// Return the location of the original name token.
|
/// Return the location of the original name token.
|
||||||
llvm::SMLoc getNameLoc() const override { return nameLoc; }
|
llvm::SMLoc getNameLoc() const override { return nameLoc; }
|
||||||
|
|
Loading…
Reference in New Issue