Skip to content

Commit 205d8e6

Browse files
committed
Sema: Remove unnecessary operator new overload
1 parent ba7df40 commit 205d8e6

File tree

3 files changed

+1
-10
lines changed

3 files changed

+1
-10
lines changed

include/swift/Sema/ConstraintSystem.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,10 +95,6 @@ Type typeCheckParameterDefault(Expr *&, DeclContext *, Type, bool, bool);
9595

9696
} // end namespace swift
9797

98-
/// Allocate memory within the given constraint system.
99-
void *operator new(size_t bytes, swift::constraints::ConstraintSystem& cs,
100-
size_t alignment = 8);
101-
10298
namespace swift {
10399

104100
/// Specify how we handle the binding of underconstrained (free) type variables

lib/Sema/Constraint.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1141,7 +1141,7 @@ Constraint::getTrailingClosureMatching() const {
11411141

11421142
void *Constraint::operator new(size_t bytes, ConstraintSystem& cs,
11431143
size_t alignment) {
1144-
return ::operator new (bytes, cs, alignment);
1144+
return cs.getAllocator().Allocate(bytes, alignment);
11451145
}
11461146

11471147
// FIXME: Perhaps we should store the Constraint -> PreparedOverload mapping

lib/Sema/TypeCheckConstraints.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -214,11 +214,6 @@ bool TypeVariableType::Implementation::isTernary() const {
214214
return locator && locator->directlyAt<TernaryExpr>();
215215
}
216216

217-
void *operator new(size_t bytes, ConstraintSystem& cs,
218-
size_t alignment) {
219-
return cs.getAllocator().Allocate(bytes, alignment);
220-
}
221-
222217
bool constraints::computeTupleShuffle(TupleType *fromTuple,
223218
TupleType *toTuple,
224219
SmallVectorImpl<unsigned> &sources) {

0 commit comments

Comments
 (0)