Skip to content

Commit

Permalink
[NFC] Fix warning
Browse files Browse the repository at this point in the history
  • Loading branch information
darthscsi committed Nov 2, 2021
1 parent ada6bf6 commit 544f8d4
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions lib/Dialect/FIRRTL/Transforms/InferWidths.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ struct UnaryExpr : public Expr {
template <class DerivedT, Expr::Kind DerivedKind>
struct UnaryExprBase : public UnaryExpr {
template <typename... Args>
UnaryExprBase(Args &&... args)
UnaryExprBase(Args &&...args)
: UnaryExpr(DerivedKind, std::forward<Args>(args)...) {}
static bool classof(const Expr *e) { return e->kind == DerivedKind; }
};
Expand Down Expand Up @@ -226,7 +226,7 @@ struct BinaryExpr : public Expr {
template <class DerivedT, Expr::Kind DerivedKind>
struct BinaryExprBase : public BinaryExpr {
template <typename... Args>
BinaryExprBase(Args &&... args)
BinaryExprBase(Args &&...args)
: BinaryExpr(DerivedKind, std::forward<Args>(args)...) {}
static bool classof(const Expr *e) { return e->kind == DerivedKind; }
};
Expand Down Expand Up @@ -321,7 +321,7 @@ class InternedAllocator {
/// existing one. `R` is the type of the object to be allocated. `R` must be
/// derived from or be the type `T`.
template <typename R = T, typename... Args>
std::pair<R *, bool> alloc(Args &&... args) {
std::pair<R *, bool> alloc(Args &&...args) {
auto stack_value = R(std::forward<Args>(args)...);
auto stack_slot = Slot(&stack_value);
auto it = interned.find(stack_slot);
Expand All @@ -345,7 +345,7 @@ class VarAllocator {
/// Allocate a new object. `R` is the type of the object to be allocated. `R`
/// must be derived from or be the type `T`.
template <typename R = T, typename... Args>
R *alloc(Args &&... args) {
R *alloc(Args &&...args) {
return new (allocator) R(std::forward<Args>(args)...);
}
};
Expand Down Expand Up @@ -630,7 +630,7 @@ class ConstraintSolver {

/// Add an allocated expression to the list above.
template <typename R, typename T, typename... Args>
R *alloc(InternedAllocator<T> &allocator, Args &&... args) {
R *alloc(InternedAllocator<T> &allocator, Args &&...args) {
auto it = allocator.template alloc<R>(std::forward<Args>(args)...);
if (it.second)
exprs.push_back(it.first);
Expand Down Expand Up @@ -1465,6 +1465,7 @@ LogicalResult InferenceMapping::mapOperation(Operation *op) {
case MemOp::PortKind::ReadWrite:
return ArrayRef<unsigned>(indices); // {3, 5}
}
llvm_unreachable("Imposible PortKind");
};

// This creates independent variables for every data port. Yet, what we
Expand Down

0 comments on commit 544f8d4

Please sign in to comment.